aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kernel-doc
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2017-03-30 16:11:29 -0400
committerJonathan Corbet <corbet@lwn.net>2017-04-02 16:06:56 -0400
commitf9b5c5304ce212b72c5c997b298ab96002e1634f (patch)
tree08d0a5a9cfb01dde6b2cd7cf7a843fcab543c854 /scripts/kernel-doc
parentb97f193abf83e30ef43317ba4883ce3a82f8e8b2 (diff)
scripts/kernel-doc: fix handling of parameters with parenthesis
lib/crc32c defines one parameter as: const u32 (*tab)[256] Better handle parenthesis, to avoid those warnings: ./lib/crc32.c:149: warning: No description found for parameter 'tab)[256]' ./lib/crc32.c:149: warning: Excess function parameter 'tab' description in 'crc32_le_generic' ./lib/crc32.c:294: warning: No description found for parameter 'tab)[256]' ./lib/crc32.c:294: warning: Excess function parameter 'tab' description in 'crc32_be_generic' Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-xscripts/kernel-doc7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index a4e5cc3b38e8..a26a5f2dce39 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -2402,8 +2402,7 @@ sub push_parameter($$$) {
2402 } 2402 }
2403 2403
2404 $anon_struct_union = 0; 2404 $anon_struct_union = 0;
2405 my $param_name = $param; 2405 $param =~ s/[\[\)].*//;
2406 $param_name =~ s/\[.*//;
2407 2406
2408 if ($type eq "" && $param =~ /\.\.\.$/) 2407 if ($type eq "" && $param =~ /\.\.\.$/)
2409 { 2408 {
@@ -2434,9 +2433,9 @@ sub push_parameter($$$) {
2434 # but inline preprocessor statements); 2433 # but inline preprocessor statements);
2435 # also ignore unnamed structs/unions; 2434 # also ignore unnamed structs/unions;
2436 if (!$anon_struct_union) { 2435 if (!$anon_struct_union) {
2437 if (!defined $parameterdescs{$param_name} && $param_name !~ /^#/) { 2436 if (!defined $parameterdescs{$param} && $param !~ /^#/) {
2438 2437
2439 $parameterdescs{$param_name} = $undescribed; 2438 $parameterdescs{$param} = $undescribed;
2440 2439
2441 if (($type eq 'function') || ($type eq 'enum')) { 2440 if (($type eq 'function') || ($type eq 'enum')) {
2442 print STDERR "${file}:$.: warning: Function parameter ". 2441 print STDERR "${file}:$.: warning: Function parameter ".