diff options
| author | Jani Nikula <jani.nikula@intel.com> | 2016-05-26 01:57:29 -0400 |
|---|---|---|
| committer | Jani Nikula <jani.nikula@intel.com> | 2016-05-30 06:38:59 -0400 |
| commit | 13901ef27c354e1bab49a30184ae3b96d96e521a (patch) | |
| tree | 14824562c79870cff91ff793ff3a578e76976d29 /scripts/kernel-doc | |
| parent | c099ff6989baf286da8eaed5c7b3d18ae60ea2e7 (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-x | scripts/kernel-doc | 14 |
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' |
| 397 | my $decl_type; | 397 | my $decl_type; |
| 398 | 398 | ||
| 399 | my $doc_special = "\@\%\$\&"; | ||
| 400 | |||
| 401 | my $doc_start = '^/\*\*\s*$'; # Allow whitespace at end of comment start. | 399 | my $doc_start = '^/\*\*\s*$'; # Allow whitespace at end of comment start. |
| 402 | my $doc_end = '\*/'; | 400 | my $doc_end = '\*/'; |
| 403 | my $doc_com = '\s*\*\s*'; | 401 | my $doc_com = '\s*\*\s*'; |
| 404 | my $doc_com_body = '\s*\* ?'; | 402 | my $doc_com_body = '\s*\* ?'; |
| 405 | my $doc_decl = $doc_com . '(\w+)'; | 403 | my $doc_decl = $doc_com . '(\w+)'; |
| 406 | my $doc_sect = $doc_com . '([' . $doc_special . ']?[\w\s]+):(.*)'; | 404 | my $doc_sect = $doc_com . '(\@?[\w\s]+):(.*)'; |
| 407 | my $doc_content = $doc_com_body . '(.*)'; | 405 | my $doc_content = $doc_com_body . '(.*)'; |
| 408 | my $doc_block = $doc_com . 'DOC:\s*(.*)?'; | 406 | my $doc_block = $doc_com . 'DOC:\s*(.*)?'; |
| 409 | my $doc_inline_start = '^\s*/\*\*\s*$'; | 407 | my $doc_inline_start = '^\s*/\*\*\s*$'; |
| @@ -411,7 +409,6 @@ my $doc_inline_sect = '\s*\*\s*(@[\w\s]+):(.*)'; | |||
| 411 | my $doc_inline_end = '^\s*\*/\s*$'; | 409 | my $doc_inline_end = '^\s*\*/\s*$'; |
| 412 | my $export_symbol = '^\s*EXPORT_SYMBOL(_GPL)?\s*\(\s*(\w+)\s*\)\s*;'; | 410 | my $export_symbol = '^\s*EXPORT_SYMBOL(_GPL)?\s*\(\s*(\w+)\s*\)\s*;'; |
| 413 | 411 | ||
| 414 | my %constants; | ||
| 415 | my %parameterdescs; | 412 | my %parameterdescs; |
| 416 | my @parameterlist; | 413 | my @parameterlist; |
| 417 | my %sections; | 414 | my %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 | ||
| 2529 | sub reset_state { | 2522 | sub 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 = (); |
