Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c950a173 authored by Silvio Fricke's avatar Silvio Fricke Committed by Jonathan Corbet
Browse files

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: default avatarSilvio Fricke <silvio.fricke@gmail.com>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 9d2cccdd
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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 =~ /\.\.\.$/)
	{
	    if (!$param =~ /\w\.\.\.$/) {
	      # handles unnamed variable parameters
	      $param = "...";
	    }
	    if (!defined $parameterdescs{$param} || $parameterdescs{$param} eq "") {
		$parameterdescs{$param} = "variable arguments";
	    }