mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 10:45:49 +00:00
kernel-doc: suppress 'not described' warnings for embedded struct fields
The ability to add kerneldoc comments for fields in embedded structures is useful, but it brought along a whole bunch of warnings for fields that could not be described before. In many cases, there's little value in adding docs for these nested fields, and in cases like: struct a { struct b { int c; } d, e; }; "c" would have to be described twice (as d.c and e.c) to make the warnings go away. We can no doubt do something smarter, but simply suppressing the warnings for this case removes about 70 warnings from the docs build, freeing us to focus on the ones that matter more. So make kerneldoc be silent about missing descriptions for any field containing a ".". Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
parent
959b496878
commit
be5cd20c9b
@ -1474,7 +1474,7 @@ sub push_parameter($$$$) {
|
||||
if (!defined $parameterdescs{$param} && $param !~ /^#/) {
|
||||
$parameterdescs{$param} = $undescribed;
|
||||
|
||||
if (show_warnings($type, $declaration_name)) {
|
||||
if (show_warnings($type, $declaration_name) && $param !~ /\./) {
|
||||
print STDERR
|
||||
"${file}:$.: warning: Function parameter or member '$param' not described in '$declaration_name'\n";
|
||||
++$warnings;
|
||||
|
Loading…
Reference in New Issue
Block a user