scripts: kernel-doc: print the declaration name on warnings
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 18 Dec 2017 12:30:15 +0000 (10:30 -0200)
committerJonathan Corbet <corbet@lwn.net>
Thu, 21 Dec 2017 20:41:47 +0000 (13:41 -0700)
commit151c468b44a89a9f3173ab8575690014b7249893
treee615ca966937e9d2759ed20a3704359e1be4adda
parent1081de2d2f9179d7280926e37b7b22b4f2fb32e6
scripts: kernel-doc: print the declaration name on warnings

The logic at create_parameterlist()'s ancillary push_parameter()
function has already a way to output the declaration name, with
would help to discover what declaration is missing.

However, currently, the logic is utterly broken, as it uses
the var $type with a wrong meaning. With the current code,
it will never print anything. I suspect that originally
it was using the second argument of output_declaration().

I opted to not rely on a globally defined $declaration_name,
but, instead, to pass it explicitly as a parameter.

While here, I removed a unaligned check for !$anon_struct_union.
This is not needed, as, if $anon_struct_union is not zero,
$parameterdescs{$param} will be defined.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
scripts/kernel-doc