Randy Dunlap cf419d542f kernel-doc: fix declaration type determination
Make declaration type determination more robust.

When scripts/kernel-doc is deciding if some kernel-doc notation
contains an enum, a struct, a union, a typedef, or a function,
it does a pattern match on the beginning of the string, looking
for a match with one of "struct", "union", "enum", or "typedef",
and otherwise defaults to a function declaration type.
However, if a function or a function-like macro has a name that
begins with "struct" (e.g., struct_size()), then kernel-doc
incorrectly decides that this is a struct declaration.

Fix this by looking for the declaration type keywords having an
ending word boundary (\b), so that "struct_size" will not match
a struct declaration.

I compared lots of html before/after output from core-api, driver-api,
and networking.  There were no differences in any of the files that
I checked.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Tested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2018-10-18 12:20:35 -06:00
..
2018-08-26 11:41:08 -07:00
2017-03-28 16:16:52 +02:00
2012-06-27 12:44:29 -07:00
2017-11-17 17:45:29 -08:00
2017-11-14 18:25:40 -08:00
2017-11-17 17:45:29 -08:00
2018-02-06 18:32:47 -08:00
2017-11-17 17:45:29 -08:00
2014-08-20 16:03:45 +02:00