mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
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: 1081de2d2f ("scripts: kernel-doc: get rid of $nested parameter")
Signed-off-by: Randy Dunlap <[email protected]>
Link: https://lore.kernel.org/all/[email protected]/
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: [email protected]
Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
This commit is contained in:
committed by
Jonathan Corbet
parent
121d0ba224
commit
b77fdd6a48
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user