summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMartin Waitz <tali@admingilde.org>2006-01-10 05:53:55 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 17:01:54 +0100
commita6d3fe77dace2c41a32b9699fe78960ab0908a97 (patch)
tree344e0f32ffcfc85d8494abca697d0cba682649b0 /scripts
parent[PATCH] DocBook: fix kernel-doc comments (diff)
downloadlinux-a6d3fe77dace2c41a32b9699fe78960ab0908a97.tar.xz
linux-a6d3fe77dace2c41a32b9699fe78960ab0908a97.zip
[PATCH] DocBook: warn for missing macro parameters
Previously kernel-doc silently ignored missing parameter descriptions for preprocessor macros. Now that all such omissions are fixed up we can warn about them in kernel-doc to be able to keep it that way. Signed-off-by: Martin Waitz <tali@admingilde.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kernel-doc12
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($$$) {
my $type;
my $param;
+ # temporarily replace commas inside function pointer definition
while ($args =~ /(\([^\),]+),/) {
$args =~ s/(\([^\),]+),/$1#/g;
}
@@ -1465,11 +1466,10 @@ sub push_parameter($$$) {
my $param_name = $param;
$param_name =~ s/\[.*//;
- if ($type eq "" && $param eq "...")
+ if ($type eq "" && $param =~ /\.\.\.$/)
{
$type="";
- $param="...";
- $parameterdescs{"..."} = "variable arguments";
+ $parameterdescs{$param} = "variable arguments";
}
elsif ($type eq "" && ($param eq "" or $param eq "void"))
{
@@ -1477,7 +1477,11 @@ sub push_parameter($$$) {
$param="void";
$parameterdescs{void} = "no arguments";
}
- if (defined $type && $type && !defined $parameterdescs{$param_name}) {
+ # warn if parameter has no description
+ # (but ignore ones starting with # as these are no parameters
+ # but inline preprocessor statements
+ if (!defined $parameterdescs{$param_name} && $param_name !~ /^#/) {
+
$parameterdescs{$param_name} = $undescribed;
if (($type eq 'function') || ($type eq 'enum')) {