On Wed, 19 Oct 2016, Silvio Fricke <silvio.fri...@gmail.com> wrote:
> 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.fri...@gmail.com>

kernel-doc is a monster, I'm no perlist, and I'm a bit hesitant, but
what the heck,

Reviewed-by: Jani Nikula <jani.nik...@intel.com>

If you have the time, please do something like

$ make cleandocs
$ make htmldocs
$ mv Documentation/output Documentation/output.not
$ git am this.patch
$ make cleandocs
$ make htmldocs
$ diff Documentation/output Documentation/output.not

and ignore Documentation/output/.doctrees changes. You need to do
cleandocs because, IIRC, we don't have a dependency on the tools
themselves. I did a bunch of this kind of sanity checking with my
kernel-doc changes, and sometimes this blew up in surprising ways...

BR,
Jani.

> ---
>  scripts/kernel-doc | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/kernel-doc b/scripts/kernel-doc
> index 93721f3..e10378f 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 = '\\&amp;((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";
>           }

-- 
Jani Nikula, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to