summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@infradead.org>2023-12-13 23:02:00 -0800
committerJonathan Corbet <corbet@lwn.net>2023-12-15 09:17:45 -0700
commitb77fdd6a48e60a0ed1865edbe6d9bf0538551f85 (patch)
tree4aa6c3d8be6f0b8282aaf5131842285957d0610a /scripts
parent121d0ba224d94ba7c16cc40faa48895496cb560c (diff)
scripts/kernel-doc: restore warning for Excess struct/union
The warning for Excess struct or union member description was removed when the $nested parameter of check_sections() was removed. This causes some kernel-doc notation warnings to be missed. Recently the kernel test robot somehow reported an Excess member. The code in kernel-doc has not issued that warning since kernel v4.16, so I don't know how the robot did it. (See the Link for the report.) drivers/net/wireless/intel/iwlwifi/fw/dbg.c:86: warning: Excess struct/union/enum/typedef member 'trans_len' description in 'iwl_fw_dump_ptrs' I patched that warning away even though I could not reproduce the warning from kernel-doc. The warning should be issued for extraneous struct member or union member description, so restore it. Fixes: 1081de2d2f91 ("scripts: kernel-doc: get rid of $nested parameter") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/all/202312060810.QT9zourt-lkp@intel.com/ Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20231214070200.24405-1-rdunlap@infradead.org
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kernel-doc7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 08a3e603db19..cb1af401d3ff 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1654,6 +1654,13 @@ sub check_sections($$$$$) {
"'$sects[$sx]' " .
"description in '$decl_name'\n");
}
+ elsif (($decl_type eq "struct") or
+ ($decl_type eq "union")) {
+ emit_warning("${file}:$.",
+ "Excess $decl_type member " .
+ "'$sects[$sx]' " .
+ "description in '$decl_name'\n");
+ }
}
}
}