aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kernel-doc
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2016-05-26 01:57:29 -0400
committerJani Nikula <jani.nikula@intel.com>2016-05-30 06:38:59 -0400
commit13901ef27c354e1bab49a30184ae3b96d96e521a (patch)
tree14824562c79870cff91ff793ff3a578e76976d29 /scripts/kernel-doc
parentc099ff6989baf286da8eaed5c7b3d18ae60ea2e7 (diff)
kernel-doc: do not regard $, %, or & prefixes as special in section names
The use of these is confusing in the script, and per this grep, they're not used anywhere anyway: $ git grep " \* [%$&][a-zA-Z0-9_]*:" -- *.[ch] | grep -v "\$\(Id\|Revision\|Date\)" While at it, throw out the constants array, nothing is ever put there again. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-xscripts/kernel-doc14
1 files changed, 2 insertions, 12 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 76bad55c031e..f795660dfc7b 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -396,14 +396,12 @@ my $inline_doc_state;
396# 'function', 'struct', 'union', 'enum', 'typedef' 396# 'function', 'struct', 'union', 'enum', 'typedef'
397my $decl_type; 397my $decl_type;
398 398
399my $doc_special = "\@\%\$\&";
400
401my $doc_start = '^/\*\*\s*$'; # Allow whitespace at end of comment start. 399my $doc_start = '^/\*\*\s*$'; # Allow whitespace at end of comment start.
402my $doc_end = '\*/'; 400my $doc_end = '\*/';
403my $doc_com = '\s*\*\s*'; 401my $doc_com = '\s*\*\s*';
404my $doc_com_body = '\s*\* ?'; 402my $doc_com_body = '\s*\* ?';
405my $doc_decl = $doc_com . '(\w+)'; 403my $doc_decl = $doc_com . '(\w+)';
406my $doc_sect = $doc_com . '([' . $doc_special . ']?[\w\s]+):(.*)'; 404my $doc_sect = $doc_com . '(\@?[\w\s]+):(.*)';
407my $doc_content = $doc_com_body . '(.*)'; 405my $doc_content = $doc_com_body . '(.*)';
408my $doc_block = $doc_com . 'DOC:\s*(.*)?'; 406my $doc_block = $doc_com . 'DOC:\s*(.*)?';
409my $doc_inline_start = '^\s*/\*\*\s*$'; 407my $doc_inline_start = '^\s*/\*\*\s*$';
@@ -411,7 +409,6 @@ my $doc_inline_sect = '\s*\*\s*(@[\w\s]+):(.*)';
411my $doc_inline_end = '^\s*\*/\s*$'; 409my $doc_inline_end = '^\s*\*/\s*$';
412my $export_symbol = '^\s*EXPORT_SYMBOL(_GPL)?\s*\(\s*(\w+)\s*\)\s*;'; 410my $export_symbol = '^\s*EXPORT_SYMBOL(_GPL)?\s*\(\s*(\w+)\s*\)\s*;';
413 411
414my %constants;
415my %parameterdescs; 412my %parameterdescs;
416my @parameterlist; 413my @parameterlist;
417my %sections; 414my %sections;
@@ -511,11 +508,7 @@ sub dump_section {
511 my $name = shift; 508 my $name = shift;
512 my $contents = join "\n", @_; 509 my $contents = join "\n", @_;
513 510
514 if ($name =~ m/$type_constant/) { 511 if ($name =~ m/$type_param/) {
515 $name = $1;
516# print STDERR "constant section '$1' = '$contents'\n";
517 $constants{$name} = $contents;
518 } elsif ($name =~ m/$type_param/) {
519# print STDERR "parameter def '$1' = '$contents'\n"; 512# print STDERR "parameter def '$1' = '$contents'\n";
520 $name = $1; 513 $name = $1;
521 $parameterdescs{$name} = $contents; 514 $parameterdescs{$name} = $contents;
@@ -2528,7 +2521,6 @@ sub dump_function($$) {
2528 2521
2529sub reset_state { 2522sub reset_state {
2530 $function = ""; 2523 $function = "";
2531 %constants = ();
2532 %parameterdescs = (); 2524 %parameterdescs = ();
2533 %parametertypes = (); 2525 %parametertypes = ();
2534 @parameterlist = (); 2526 @parameterlist = ();
@@ -2924,7 +2916,6 @@ sub process_file($) {
2924 dump_doc_section($file, $section, xml_escape($contents)); 2916 dump_doc_section($file, $section, xml_escape($contents));
2925 $contents = ""; 2917 $contents = "";
2926 $function = ""; 2918 $function = "";
2927 %constants = ();
2928 %parameterdescs = (); 2919 %parameterdescs = ();
2929 %parametertypes = (); 2920 %parametertypes = ();
2930 @parameterlist = (); 2921 @parameterlist = ();
@@ -2942,7 +2933,6 @@ sub process_file($) {
2942 dump_doc_section($file, $section, xml_escape($contents)); 2933 dump_doc_section($file, $section, xml_escape($contents));
2943 $contents = ""; 2934 $contents = "";
2944 $function = ""; 2935 $function = "";
2945 %constants = ();
2946 %parameterdescs = (); 2936 %parameterdescs = ();
2947 %parametertypes = (); 2937 %parametertypes = ();
2948 @parameterlist = (); 2938 @parameterlist = ();