aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kernel-doc
diff options
context:
space:
mode:
authorSilvio Fricke <silvio.fricke@gmail.com>2016-10-28 04:14:08 -0400
committerJonathan Corbet <corbet@lwn.net>2016-10-28 12:54:16 -0400
commitc950a1739eaef2ab64372fc35af7301fcef2c9a7 (patch)
treea4d51dccf50f932587fbd626a35b444415b83fcc /scripts/kernel-doc
parent9d2cccdd6c226181c42a7bb0c5ede1583687b618 (diff)
kernel-doc: better parsing of named variable arguments
Without this patch we get warnings for named variable arguments. warning: No description found for parameter '...' warning: Excess function parameter 'args' description in 'alloc_ordered_workqueue' Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-xscripts/kernel-doc8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 93721f3c91bf..e10378f769f9 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -204,6 +204,7 @@ EOF
204 204
205## init lots of data 205## init lots of data
206 206
207
207my $errors = 0; 208my $errors = 0;
208my $warnings = 0; 209my $warnings = 0;
209my $anon_struct_union = 0; 210my $anon_struct_union = 0;
@@ -211,7 +212,7 @@ my $anon_struct_union = 0;
211# match expressions used to find embedded type information 212# match expressions used to find embedded type information
212my $type_constant = '\%([-_\w]+)'; 213my $type_constant = '\%([-_\w]+)';
213my $type_func = '(\w+)\(\)'; 214my $type_func = '(\w+)\(\)';
214my $type_param = '\@(\w+)'; 215my $type_param = '\@(\w+(\.\.\.)?)';
215my $type_fp_param = '\@(\w+)\(\)'; # Special RST handling for func ptr params 216my $type_fp_param = '\@(\w+)\(\)'; # Special RST handling for func ptr params
216my $type_struct = '\&((struct\s*)*[_\w]+)'; 217my $type_struct = '\&((struct\s*)*[_\w]+)';
217my $type_struct_xml = '\\&amp;((struct\s*)*[_\w]+)'; 218my $type_struct_xml = '\\&amp;((struct\s*)*[_\w]+)';
@@ -2353,7 +2354,10 @@ sub push_parameter($$$) {
2353 2354
2354 if ($type eq "" && $param =~ /\.\.\.$/) 2355 if ($type eq "" && $param =~ /\.\.\.$/)
2355 { 2356 {
2356 $param = "..."; 2357 if (!$param =~ /\w\.\.\.$/) {
2358 # handles unnamed variable parameters
2359 $param = "...";
2360 }
2357 if (!defined $parameterdescs{$param} || $parameterdescs{$param} eq "") { 2361 if (!defined $parameterdescs{$param} || $parameterdescs{$param} eq "") {
2358 $parameterdescs{$param} = "variable arguments"; 2362 $parameterdescs{$param} = "variable arguments";
2359 } 2363 }