diff options
author | Silvio Fricke <silvio.fricke@gmail.com> | 2016-10-28 10:14:08 +0200 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2016-10-28 10:54:16 -0600 |
commit | c950a1739eaef2ab64372fc35af7301fcef2c9a7 (patch) | |
tree | a4d51dccf50f932587fbd626a35b444415b83fcc /scripts/kernel-doc | |
parent | 9d2cccdd6c226181c42a7bb0c5ede1583687b618 (diff) | |
download | talos-obmc-linux-c950a1739eaef2ab64372fc35af7301fcef2c9a7.tar.gz talos-obmc-linux-c950a1739eaef2ab64372fc35af7301fcef2c9a7.zip |
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-x | scripts/kernel-doc | 8 |
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 ## init lots of data + my $errors = 0; my $warnings = 0; my $anon_struct_union = 0; @@ -211,7 +212,7 @@ my $anon_struct_union = 0; # match expressions used to find embedded type information my $type_constant = '\%([-_\w]+)'; my $type_func = '(\w+)\(\)'; -my $type_param = '\@(\w+)'; +my $type_param = '\@(\w+(\.\.\.)?)'; my $type_fp_param = '\@(\w+)\(\)'; # Special RST handling for func ptr params my $type_struct = '\&((struct\s*)*[_\w]+)'; my $type_struct_xml = '\\&((struct\s*)*[_\w]+)'; @@ -2353,7 +2354,10 @@ sub push_parameter($$$) { if ($type eq "" && $param =~ /\.\.\.$/) { - $param = "..."; + if (!$param =~ /\w\.\.\.$/) { + # handles unnamed variable parameters + $param = "..."; + } if (!defined $parameterdescs{$param} || $parameterdescs{$param} eq "") { $parameterdescs{$param} = "variable arguments"; } |