diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/kernel-doc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 2f45fd2969d0..9fd5f5b87d1e 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -1405,6 +1405,7 @@ sub create_parameterlist($$$) { | |||
1405 | my $type; | 1405 | my $type; |
1406 | my $param; | 1406 | my $param; |
1407 | 1407 | ||
1408 | # temporarily replace commas inside function pointer definition | ||
1408 | while ($args =~ /(\([^\),]+),/) { | 1409 | while ($args =~ /(\([^\),]+),/) { |
1409 | $args =~ s/(\([^\),]+),/$1#/g; | 1410 | $args =~ s/(\([^\),]+),/$1#/g; |
1410 | } | 1411 | } |
@@ -1465,11 +1466,10 @@ sub push_parameter($$$) { | |||
1465 | my $param_name = $param; | 1466 | my $param_name = $param; |
1466 | $param_name =~ s/\[.*//; | 1467 | $param_name =~ s/\[.*//; |
1467 | 1468 | ||
1468 | if ($type eq "" && $param eq "...") | 1469 | if ($type eq "" && $param =~ /\.\.\.$/) |
1469 | { | 1470 | { |
1470 | $type=""; | 1471 | $type=""; |
1471 | $param="..."; | 1472 | $parameterdescs{$param} = "variable arguments"; |
1472 | $parameterdescs{"..."} = "variable arguments"; | ||
1473 | } | 1473 | } |
1474 | elsif ($type eq "" && ($param eq "" or $param eq "void")) | 1474 | elsif ($type eq "" && ($param eq "" or $param eq "void")) |
1475 | { | 1475 | { |
@@ -1477,7 +1477,11 @@ sub push_parameter($$$) { | |||
1477 | $param="void"; | 1477 | $param="void"; |
1478 | $parameterdescs{void} = "no arguments"; | 1478 | $parameterdescs{void} = "no arguments"; |
1479 | } | 1479 | } |
1480 | if (defined $type && $type && !defined $parameterdescs{$param_name}) { | 1480 | # warn if parameter has no description |
1481 | # (but ignore ones starting with # as these are no parameters | ||
1482 | # but inline preprocessor statements | ||
1483 | if (!defined $parameterdescs{$param_name} && $param_name !~ /^#/) { | ||
1484 | |||
1481 | $parameterdescs{$param_name} = $undescribed; | 1485 | $parameterdescs{$param_name} = $undescribed; |
1482 | 1486 | ||
1483 | if (($type eq 'function') || ($type eq 'enum')) { | 1487 | if (($type eq 'function') || ($type eq 'enum')) { |