diff options
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-x | scripts/kernel-doc | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index ed591e9b7d1d..ea9f8a58678f 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -1426,6 +1426,8 @@ sub dump_struct($$) { | |||
1426 | # strip comments: | 1426 | # strip comments: |
1427 | $members =~ s/\/\*.*?\*\///gos; | 1427 | $members =~ s/\/\*.*?\*\///gos; |
1428 | $nested =~ s/\/\*.*?\*\///gos; | 1428 | $nested =~ s/\/\*.*?\*\///gos; |
1429 | # strip kmemcheck_bitfield_{begin,end}.*; | ||
1430 | $members =~ s/kmemcheck_bitfield_.*?;//gos; | ||
1429 | 1431 | ||
1430 | create_parameterlist($members, ';', $file); | 1432 | create_parameterlist($members, ';', $file); |
1431 | check_sections($file, $declaration_name, "struct", $sectcheck, $struct_actual, $nested); | 1433 | check_sections($file, $declaration_name, "struct", $sectcheck, $struct_actual, $nested); |
@@ -1468,8 +1470,6 @@ sub dump_enum($$) { | |||
1468 | } | 1470 | } |
1469 | 1471 | ||
1470 | } | 1472 | } |
1471 | # strip kmemcheck_bitfield_{begin,end}.*; | ||
1472 | $members =~ s/kmemcheck_bitfield_.*?;//gos; | ||
1473 | 1473 | ||
1474 | output_declaration($declaration_name, | 1474 | output_declaration($declaration_name, |
1475 | 'enum', | 1475 | 'enum', |
@@ -1995,6 +1995,7 @@ sub process_file($) { | |||
1995 | my $identifier; | 1995 | my $identifier; |
1996 | my $func; | 1996 | my $func; |
1997 | my $descr; | 1997 | my $descr; |
1998 | my $in_purpose = 0; | ||
1998 | my $initial_section_counter = $section_counter; | 1999 | my $initial_section_counter = $section_counter; |
1999 | 2000 | ||
2000 | if (defined($ENV{'SRCTREE'})) { | 2001 | if (defined($ENV{'SRCTREE'})) { |
@@ -2044,6 +2045,7 @@ sub process_file($) { | |||
2044 | $descr =~ s/\s*$//; | 2045 | $descr =~ s/\s*$//; |
2045 | $descr =~ s/\s+/ /; | 2046 | $descr =~ s/\s+/ /; |
2046 | $declaration_purpose = xml_escape($descr); | 2047 | $declaration_purpose = xml_escape($descr); |
2048 | $in_purpose = 1; | ||
2047 | } else { | 2049 | } else { |
2048 | $declaration_purpose = ""; | 2050 | $declaration_purpose = ""; |
2049 | } | 2051 | } |
@@ -2090,6 +2092,7 @@ sub process_file($) { | |||
2090 | } | 2092 | } |
2091 | 2093 | ||
2092 | $in_doc_sect = 1; | 2094 | $in_doc_sect = 1; |
2095 | $in_purpose = 0; | ||
2093 | $contents = $newcontents; | 2096 | $contents = $newcontents; |
2094 | if ($contents ne "") { | 2097 | if ($contents ne "") { |
2095 | while ((substr($contents, 0, 1) eq " ") || | 2098 | while ((substr($contents, 0, 1) eq " ") || |
@@ -2119,11 +2122,19 @@ sub process_file($) { | |||
2119 | } elsif (/$doc_content/) { | 2122 | } elsif (/$doc_content/) { |
2120 | # miguel-style comment kludge, look for blank lines after | 2123 | # miguel-style comment kludge, look for blank lines after |
2121 | # @parameter line to signify start of description | 2124 | # @parameter line to signify start of description |
2122 | if ($1 eq "" && | 2125 | if ($1 eq "") { |
2123 | ($section =~ m/^@/ || $section eq $section_context)) { | 2126 | if ($section =~ m/^@/ || $section eq $section_context) { |
2124 | dump_section($file, $section, xml_escape($contents)); | 2127 | dump_section($file, $section, xml_escape($contents)); |
2125 | $section = $section_default; | 2128 | $section = $section_default; |
2126 | $contents = ""; | 2129 | $contents = ""; |
2130 | } else { | ||
2131 | $contents .= "\n"; | ||
2132 | } | ||
2133 | $in_purpose = 0; | ||
2134 | } elsif ($in_purpose == 1) { | ||
2135 | # Continued declaration purpose | ||
2136 | chomp($declaration_purpose); | ||
2137 | $declaration_purpose .= " " . xml_escape($1); | ||
2127 | } else { | 2138 | } else { |
2128 | $contents .= $1 . "\n"; | 2139 | $contents .= $1 . "\n"; |
2129 | } | 2140 | } |