watchdog: Fix two kernel-doc parameter warnings
Subsystems (2)
cover watchdog: Fix two kernel-doc parameter warnings
Two independent kernel-doc parameter fixes in drivers/watchdog, found by scripts/kernel-doc -none. Both warnings are in .c files, so they appear in a W=1 build, and both files are clean afterwards.
Patch 1 fixes a name mismatch: wdrtas_reboot() names its notifier block argument 'this' while the doc block says '@nb'. Patch 2 adds the missing description for the argument __booke_wdt_disable() receives from on_each_cpu() and ignores.
They touch different drivers and are not a logical unit, so they are split rather than squashed; either can be dropped without affecting the other.
One thing I would rather state than have assumed: both drivers are PowerPC-only and I have no PowerPC toolchain here, so neither file was compiled. The whole series is three lines and every one of them is inside a /** */ block, so there is no code change to compile. Checked with scripts/kernel-doc -none (3 warnings across these two files before, 0 after) and checkpatch --strict.
Babanpreet Singh (2):
watchdog: wdrtas: Fix kernel-doc parameter name for wdrtas_reboot()
watchdog: booke_wdt: Document unused parameter of
__booke_wdt_disable()
drivers/watchdog/booke_wdt.c | 1 + drivers/watchdog/wdrtas.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0
PATCH 1/2 watchdog: wdrtas: Fix kernel-doc parameter name for wdrtas_reboot()
scripts/kernel-doc -none reports:
Warning: drivers/watchdog/wdrtas.c:460 function parameter 'this' not described in 'wdrtas_reboot'
Warning: drivers/watchdog/wdrtas.c:460 Excess function parameter 'nb' description in 'wdrtas_reboot'
wdrtas_reboot() names its notifier block argument 'this', but the kernel-doc comment documents a parameter named 'nb'.
Update the kernel-doc comment to document the 'this' parameter.
--- drivers/watchdog/wdrtas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/wdrtas.c +1 -1
@@ -448,7 +448,7 @@ static int wdrtas_temp_close(struct inode *inode, struct file *file)/** * wdrtas_reboot - reboot notifier function -* @nb: notifier block structure +* @this: notifier block structure * @code: reboot code * @ptr: unused *
Signature · 1 line
2.43.0
Guenter Roeck
maintainerRe: [PATCH 1/2] watchdog: wdrtas: Fix kernel-doc parameter name for wdrtas_reboot()
Quoted 7 lines · Babanpreet Singh
scripts/kernel-doc-none reports:Warning:
drivers/watchdog/wdrtas.c:460function parameter 'this' not described in 'wdrtas_reboot'
Warning:drivers/watchdog/wdrtas.c:460Excess function parameter 'nb' description in 'wdrtas_reboot'
Quoted 7 lines
wdrtas_reboot()names its notifier block argument 'this', but the kernel-doc comment documents a parameter named 'nb'.Update the kernel-doc comment to document the 'this' parameter.
Assisted-by Claude:claude-opus-5Signed-off-by Babanpreet Singh <[email protected]>
This is a 20+ years old driver which doesn't use the watchdog subsystem. I am not going to apply any patches to it unless the author shows that it is a real problem observed on real hardware, and then I am likely going to ask for a conversion to the watchdog subsystem unlesss it is a critical aproblem and not just something AI came up with as a possible issue.
Guenter
Quoted 17 lines
--- drivers/watchdog/wdrtas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/watchdog/wdrtas.c +1
-1@@ -448,7 +448,7 @@ static int wdrtas_temp_close(struct inode *inode, struct file *file)/** * wdrtas_reboot - reboot notifier function -* @nb: notifier block structure +* @this: notifier block structure * @code: reboot code * @ptr: unused *
PATCH 2/2 watchdog: booke_wdt: Document unused parameter of __booke_wdt_disable()
In reply to Babanpreet Singhscripts/kernel-doc -none reports:
Warning: drivers/watchdog/booke_wdt.c:158 function parameter 'data' not described in '__booke_wdt_disable'
__booke_wdt_disable() is invoked through on_each_cpu(), so it takes a void * argument that it does not use. Its kernel-doc comment does not describe the parameter at all.
Document it as unused.
--- drivers/watchdog/booke_wdt.c | 1 + 1 file changed, 1 insertion(+)
drivers/watchdog/booke_wdt.c +1 -0
@@ -149,6 +149,7 @@ static void __booke_wdt_enable(void *data)/** * __booke_wdt_disable - disable the watchdog on the given CPU +* @data: unused * * This function is called on each CPU. It disables the watchdog on that CPU. *
Signature · 1 line
2.43.0
Re: [PATCH 2/2] watchdog: booke_wdt: Document unused parameter of __booke_wdt_disable()
Quoted 5 lines · Babanpreet Singh
scripts/kernel-doc-none reports:Warning:
drivers/watchdog/booke_wdt.c:158function parameter 'data' not described in '__booke_wdt_disable'
Quoted 8 lines
__booke_wdt_disable()is invoked throughon_each_cpu(), so it takes a void * argument that it does not use. Its kernel-doc comment does not describe the parameter at all.Document it as unused.
Assisted-by Claude:claude-opus-5Signed-off-by Babanpreet Singh <[email protected]>
Applied.
Thanks,
Guenter