diff options
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-x | scripts/kernel-doc | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 241310e59cd6..fcdfb245a575 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -13,8 +13,6 @@ use strict; | |||
13 | ## This software falls under the GNU General Public License. ## | 13 | ## This software falls under the GNU General Public License. ## |
14 | ## Please read the COPYING file for more information ## | 14 | ## Please read the COPYING file for more information ## |
15 | 15 | ||
16 | # w.o. 03-11-2000: added the '-filelist' option. | ||
17 | |||
18 | # 18/01/2001 - Cleanups | 16 | # 18/01/2001 - Cleanups |
19 | # Functions prototyped as foo(void) same as foo() | 17 | # Functions prototyped as foo(void) same as foo() |
20 | # Stop eval'ing where we don't need to. | 18 | # Stop eval'ing where we don't need to. |
@@ -245,7 +243,7 @@ my $man_date = ('January', 'February', 'March', 'April', 'May', 'June', | |||
245 | # could cause "use of undefined value" or other bugs. | 243 | # could cause "use of undefined value" or other bugs. |
246 | my ($function, %function_table, %parametertypes, $declaration_purpose); | 244 | my ($function, %function_table, %parametertypes, $declaration_purpose); |
247 | my ($type, $declaration_name, $return_type); | 245 | my ($type, $declaration_name, $return_type); |
248 | my ($newsection, $newcontents, $prototype, $filelist, $brcount, %source_map); | 246 | my ($newsection, $newcontents, $prototype, $brcount, %source_map); |
249 | 247 | ||
250 | if (defined($ENV{'KBUILD_VERBOSE'})) { | 248 | if (defined($ENV{'KBUILD_VERBOSE'})) { |
251 | $verbose = "$ENV{'KBUILD_VERBOSE'}"; | 249 | $verbose = "$ENV{'KBUILD_VERBOSE'}"; |
@@ -338,8 +336,6 @@ while ($ARGV[0] =~ m/^-(.*)/) { | |||
338 | $verbose = 1; | 336 | $verbose = 1; |
339 | } elsif (($cmd eq "-h") || ($cmd eq "--help")) { | 337 | } elsif (($cmd eq "-h") || ($cmd eq "--help")) { |
340 | usage(); | 338 | usage(); |
341 | } elsif ($cmd eq '-filelist') { | ||
342 | $filelist = shift @ARGV; | ||
343 | } elsif ($cmd eq '-no-doc-sections') { | 339 | } elsif ($cmd eq '-no-doc-sections') { |
344 | $no_doc_sections = 1; | 340 | $no_doc_sections = 1; |
345 | } | 341 | } |
@@ -1428,6 +1424,8 @@ sub dump_struct($$) { | |||
1428 | $nested =~ s/\/\*.*?\*\///gos; | 1424 | $nested =~ s/\/\*.*?\*\///gos; |
1429 | # strip kmemcheck_bitfield_{begin,end}.*; | 1425 | # strip kmemcheck_bitfield_{begin,end}.*; |
1430 | $members =~ s/kmemcheck_bitfield_.*?;//gos; | 1426 | $members =~ s/kmemcheck_bitfield_.*?;//gos; |
1427 | # strip attributes | ||
1428 | $members =~ s/__aligned\s*\(\d+\)//gos; | ||
1431 | 1429 | ||
1432 | create_parameterlist($members, ';', $file); | 1430 | create_parameterlist($members, ';', $file); |
1433 | check_sections($file, $declaration_name, "struct", $sectcheck, $struct_actual, $nested); | 1431 | check_sections($file, $declaration_name, "struct", $sectcheck, $struct_actual, $nested); |
@@ -1732,6 +1730,7 @@ sub dump_function($$) { | |||
1732 | $prototype =~ s/^noinline +//; | 1730 | $prototype =~ s/^noinline +//; |
1733 | $prototype =~ s/__devinit +//; | 1731 | $prototype =~ s/__devinit +//; |
1734 | $prototype =~ s/__init +//; | 1732 | $prototype =~ s/__init +//; |
1733 | $prototype =~ s/__init_or_module +//; | ||
1735 | $prototype =~ s/^#\s*define\s+//; #ak added | 1734 | $prototype =~ s/^#\s*define\s+//; #ak added |
1736 | $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//; | 1735 | $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//; |
1737 | 1736 | ||
@@ -1811,14 +1810,6 @@ if (open(SOURCE_MAP, "<.tmp_filelist.txt")) { | |||
1811 | close(SOURCE_MAP); | 1810 | close(SOURCE_MAP); |
1812 | } | 1811 | } |
1813 | 1812 | ||
1814 | if ($filelist) { | ||
1815 | open(FLIST,"<$filelist") or die "Can't open file list $filelist"; | ||
1816 | while(<FLIST>) { | ||
1817 | chop; | ||
1818 | process_file($_); | ||
1819 | } | ||
1820 | } | ||
1821 | |||
1822 | foreach (@ARGV) { | 1813 | foreach (@ARGV) { |
1823 | chomp; | 1814 | chomp; |
1824 | process_file($_); | 1815 | process_file($_); |
@@ -2023,6 +2014,8 @@ sub process_file($) { | |||
2023 | return; | 2014 | return; |
2024 | } | 2015 | } |
2025 | 2016 | ||
2017 | $. = 1; | ||
2018 | |||
2026 | $section_counter = 0; | 2019 | $section_counter = 0; |
2027 | while (<IN>) { | 2020 | while (<IN>) { |
2028 | if ($state == 0) { | 2021 | if ($state == 0) { |
@@ -2113,7 +2106,7 @@ sub process_file($) { | |||
2113 | $section = $newsection; | 2106 | $section = $newsection; |
2114 | } elsif (/$doc_end/) { | 2107 | } elsif (/$doc_end/) { |
2115 | 2108 | ||
2116 | if ($contents ne "") { | 2109 | if (($contents ne "") && ($contents ne "\n")) { |
2117 | dump_section($file, $section, xml_escape($contents)); | 2110 | dump_section($file, $section, xml_escape($contents)); |
2118 | $section = $section_default; | 2111 | $section = $section_default; |
2119 | $contents = ""; | 2112 | $contents = ""; |