History

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'

Silvio Fricke committed 10 years ago

Commit c950a171 parent 9d2cccd1 file · +6 −2Browse files

Showing the changes to scripts/kernel-doc (1 of 1 file). Show all

Unified · Split

scripts/kernel-doc+6−2
@@ -204,6 +204,7 @@ EOF · 203 unmodified lines
204 204
205## init lots of data205## 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; · 1 unmodified line
211# match expressions used to find embedded type information212# 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 params216my $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 = '\\&((struct\s*)*[_\w]+)';218my $type_struct_xml = '\\&((struct\s*)*[_\w]+)';
@@ -2353,7 +2354,10 @@ sub push_parameter($$$) { · 2135 unmodified lines
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 }