kernel-doc (ffb1e76f4f32d2b8ea4189df0484980370476395) kernel-doc (50d7bd38c3aafc4749e05e8d7fcb616979143602)
1#!/usr/bin/env perl
2# SPDX-License-Identifier: GPL-2.0
3
4use warnings;
5use strict;
6
7## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##
8## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ##

--- 1231 unchanged lines hidden (view full) ---

1240 $members =~ s/\/\*.*?\*\///gos;
1241 # strip attributes
1242 $members =~ s/\s*$attribute/ /gi;
1243 $members =~ s/\s*__aligned\s*\([^;]*\)/ /gos;
1244 $members =~ s/\s*__packed\s*/ /gos;
1245 $members =~ s/\s*CRYPTO_MINALIGN_ATTR/ /gos;
1246 $members =~ s/\s*____cacheline_aligned_in_smp/ /gos;
1247 $members =~ s/\s*____cacheline_aligned/ /gos;
1#!/usr/bin/env perl
2# SPDX-License-Identifier: GPL-2.0
3
4use warnings;
5use strict;
6
7## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##
8## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ##

--- 1231 unchanged lines hidden (view full) ---

1240 $members =~ s/\/\*.*?\*\///gos;
1241 # strip attributes
1242 $members =~ s/\s*$attribute/ /gi;
1243 $members =~ s/\s*__aligned\s*\([^;]*\)/ /gos;
1244 $members =~ s/\s*__packed\s*/ /gos;
1245 $members =~ s/\s*CRYPTO_MINALIGN_ATTR/ /gos;
1246 $members =~ s/\s*____cacheline_aligned_in_smp/ /gos;
1247 $members =~ s/\s*____cacheline_aligned/ /gos;
1248 # unwrap struct_group():
1249 # - first eat non-declaration parameters and rewrite for final match
1250 # - then remove macro, outer parens, and trailing semicolon
1251 $members =~ s/\bstruct_group\s*\(([^,]*,)/STRUCT_GROUP(/gos;
1252 $members =~ s/\bstruct_group_(attr|tagged)\s*\(([^,]*,){2}/STRUCT_GROUP(/gos;
1253 $members =~ s/\b__struct_group\s*\(([^,]*,){3}/STRUCT_GROUP(/gos;
1254 $members =~ s/\bSTRUCT_GROUP(\(((?:(?>[^)(]+)|(?1))*)\))[^;]*;/$2/gos;
1248
1249 my $args = qr{([^,)]+)};
1250 # replace DECLARE_BITMAP
1251 $members =~ s/__ETHTOOL_DECLARE_LINK_MODE_MASK\s*\(([^\)]+)\)/DECLARE_BITMAP($1, __ETHTOOL_LINK_MODE_MASK_NBITS)/gos;
1252 $members =~ s/DECLARE_BITMAP\s*\($args,\s*$args\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos;
1253 # replace DECLARE_HASHTABLE
1254 $members =~ s/DECLARE_HASHTABLE\s*\($args,\s*$args\)/unsigned long $1\[1 << (($2) - 1)\]/gos;
1255 # replace DECLARE_KFIFO

--- 1257 unchanged lines hidden ---
1255
1256 my $args = qr{([^,)]+)};
1257 # replace DECLARE_BITMAP
1258 $members =~ s/__ETHTOOL_DECLARE_LINK_MODE_MASK\s*\(([^\)]+)\)/DECLARE_BITMAP($1, __ETHTOOL_LINK_MODE_MASK_NBITS)/gos;
1259 $members =~ s/DECLARE_BITMAP\s*\($args,\s*$args\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos;
1260 # replace DECLARE_HASHTABLE
1261 $members =~ s/DECLARE_HASHTABLE\s*\($args,\s*$args\)/unsigned long $1\[1 << (($2) - 1)\]/gos;
1262 # replace DECLARE_KFIFO

--- 1257 unchanged lines hidden ---