kernel-doc (0ea8a56de21be24cb79abb03dee79aabcd60a316) | kernel-doc (a070991fe9d1b6d97eb3cf24a2a6ed5f8e7c0169) |
---|---|
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> ## --- 1069 unchanged lines hidden (view full) --- 1078sub dump_union($$) { 1079 dump_struct(@_); 1080} 1081 1082sub dump_struct($$) { 1083 my $x = shift; 1084 my $file = shift; 1085 | 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> ## --- 1069 unchanged lines hidden (view full) --- 1078sub dump_union($$) { 1079 dump_struct(@_); 1080} 1081 1082sub dump_struct($$) { 1083 my $x = shift; 1084 my $file = shift; 1085 |
1086 if ($x =~ /(struct|union)\s+(\w+)\s*\{(.*)\}(\s*(__packed|__aligned|____cacheline_aligned_in_smp|__attribute__\s*\(\([a-z0-9,_\s\(\)]*\)\)))*/) { | 1086 if ($x =~ /(struct|union)\s+(\w+)\s*\{(.*)\}(\s*(__packed|__aligned|____cacheline_aligned_in_smp|____cacheline_aligned|__attribute__\s*\(\([a-z0-9,_\s\(\)]*\)\)))*/) { |
1087 my $decl_type = $1; 1088 $declaration_name = $2; 1089 my $members = $3; 1090 1091 # ignore members marked private: 1092 $members =~ s/\/\*\s*private:.*?\/\*\s*public:.*?\*\///gosi; 1093 $members =~ s/\/\*\s*private:.*//gosi; 1094 # strip comments: 1095 $members =~ s/\/\*.*?\*\///gos; 1096 # strip attributes 1097 $members =~ s/\s*__attribute__\s*\(\([a-z0-9,_\*\s\(\)]*\)\)/ /gi; 1098 $members =~ s/\s*__aligned\s*\([^;]*\)/ /gos; 1099 $members =~ s/\s*__packed\s*/ /gos; 1100 $members =~ s/\s*CRYPTO_MINALIGN_ATTR/ /gos; 1101 $members =~ s/\s*____cacheline_aligned_in_smp/ /gos; | 1087 my $decl_type = $1; 1088 $declaration_name = $2; 1089 my $members = $3; 1090 1091 # ignore members marked private: 1092 $members =~ s/\/\*\s*private:.*?\/\*\s*public:.*?\*\///gosi; 1093 $members =~ s/\/\*\s*private:.*//gosi; 1094 # strip comments: 1095 $members =~ s/\/\*.*?\*\///gos; 1096 # strip attributes 1097 $members =~ s/\s*__attribute__\s*\(\([a-z0-9,_\*\s\(\)]*\)\)/ /gi; 1098 $members =~ s/\s*__aligned\s*\([^;]*\)/ /gos; 1099 $members =~ s/\s*__packed\s*/ /gos; 1100 $members =~ s/\s*CRYPTO_MINALIGN_ATTR/ /gos; 1101 $members =~ s/\s*____cacheline_aligned_in_smp/ /gos; |
1102 $members =~ s/\s*____cacheline_aligned/ /gos; |
|
1102 1103 # replace DECLARE_BITMAP 1104 $members =~ s/__ETHTOOL_DECLARE_LINK_MODE_MASK\s*\(([^\)]+)\)/DECLARE_BITMAP($1, __ETHTOOL_LINK_MODE_MASK_NBITS)/gos; 1105 $members =~ s/DECLARE_BITMAP\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos; 1106 # replace DECLARE_HASHTABLE 1107 $members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos; 1108 # replace DECLARE_KFIFO 1109 $members =~ s/DECLARE_KFIFO\s*\(([^,)]+),\s*([^,)]+),\s*([^,)]+)\)/$2 \*$1/gos; --- 479 unchanged lines hidden (view full) --- 1589# takes a function prototype and the name of the current file being 1590# processed and spits out all the details stored in the global 1591# arrays/hashes. 1592sub dump_function($$) { 1593 my $prototype = shift; 1594 my $file = shift; 1595 my $noret = 0; 1596 | 1103 1104 # replace DECLARE_BITMAP 1105 $members =~ s/__ETHTOOL_DECLARE_LINK_MODE_MASK\s*\(([^\)]+)\)/DECLARE_BITMAP($1, __ETHTOOL_LINK_MODE_MASK_NBITS)/gos; 1106 $members =~ s/DECLARE_BITMAP\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos; 1107 # replace DECLARE_HASHTABLE 1108 $members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos; 1109 # replace DECLARE_KFIFO 1110 $members =~ s/DECLARE_KFIFO\s*\(([^,)]+),\s*([^,)]+),\s*([^,)]+)\)/$2 \*$1/gos; --- 479 unchanged lines hidden (view full) --- 1590# takes a function prototype and the name of the current file being 1591# processed and spits out all the details stored in the global 1592# arrays/hashes. 1593sub dump_function($$) { 1594 my $prototype = shift; 1595 my $file = shift; 1596 my $noret = 0; 1597 |
1598 print_lineno($.); 1599 |
|
1597 $prototype =~ s/^static +//; 1598 $prototype =~ s/^extern +//; 1599 $prototype =~ s/^asmlinkage +//; 1600 $prototype =~ s/^inline +//; 1601 $prototype =~ s/^__inline__ +//; 1602 $prototype =~ s/^__inline +//; 1603 $prototype =~ s/^__always_inline +//; 1604 $prototype =~ s/^noinline +//; --- 682 unchanged lines hidden --- | 1600 $prototype =~ s/^static +//; 1601 $prototype =~ s/^extern +//; 1602 $prototype =~ s/^asmlinkage +//; 1603 $prototype =~ s/^inline +//; 1604 $prototype =~ s/^__inline__ +//; 1605 $prototype =~ s/^__inline +//; 1606 $prototype =~ s/^__always_inline +//; 1607 $prototype =~ s/^noinline +//; --- 682 unchanged lines hidden --- |