kernel-doc: strip attributes even if they have an argument
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 2 Jan 2017 15:22:24 +0000 (16:22 +0100)
committerJonathan Corbet <corbet@lwn.net>
Wed, 4 Jan 2017 22:07:42 +0000 (15:07 -0700)
commitb1aaa546b52baf7cdc97961e9ba445a26948c1af
treee155e394d0c4698005ebf021a3d50311459ee64b
parent02a4f4fe522c29bcd4a61e094f7fe8d64f00ee06
kernel-doc: strip attributes even if they have an argument

An inline function can have an attribute, as in include/linux/log2.h,
and kernel-doc handles this already for simple cases.  However,
some attributes have arguments (e.g. the "target" attribute).
Handle those too.

Furthermore, attributes could be at the beginning of a function
declaration, before the return type.  To correctly handle this case,
you need to strip spaces after the attributes; otherwise, dump_function
is left confused.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
scripts/kernel-doc