kernel/watchdog: change prototype of watchdog_nmi_enable()
PATCH 1/1 kernel/watchdog: change prototype of watchdog_nmi_enable()
The only caller does not handle the return value of watchdog_nmi_enable(). If there is an error, it seems to be reported by arch specific code.
Hence changing watchdog_nmi_enable() return value from int to void.
To: [email protected]
To: [email protected]
--- arch/sparc/kernel/nmi.c | 8 +++----- include/linux/nmi.h | 2 +- kernel/watchdog.c | 3 +-- 3 files changed, 5 insertions(+), 8 deletions(-)
arch/sparc/kernel/nmi.c +3 -5
@@ -282,11 +282,11 @@ __setup("nmi_watchdog=", setup_nmi_watchdog);* sparc specific NMI watchdog enable function. * Enables watchdog if it is not enabled already. */ -int watchdog_nmi_enable (unsigned int cpu) +void watchdog_nmi_enable (unsigned int cpu) {if (atomic_read (&nmi_active) ==-1 ) {pr_warn ("NMI watchdog cannot be enabled or disabled\n" ); -return -1 ; +return ; }/*
@@ -295,11 +295,9 @@ int watchdog_nmi_enable(unsigned int cpu)* process first. */ if (!nmi_init_done) -return 0 ; +return ;smp_call_function_single (cpu, start_nmi_watchdog,NULL ,1 ); - -return 0 ; }/* * sparc specific NMI watchdog disable function.
include/linux/nmi.h +1 -1
@@ -119,7 +119,7 @@ static inline int hardlockup_detector_perf_init(void) { return 0; }void watchdog_nmi_stop (void );void watchdog_nmi_start (void );int watchdog_nmi_probe (void ); -int watchdog_nmi_enable (unsigned int cpu); +void watchdog_nmi_enable (unsigned int cpu);void watchdog_nmi_disable (unsigned int cpu);/**
kernel/watchdog.c +1 -2
@@ -95,10 +95,9 @@ __setup("nmi_watchdog=", hardlockup_panic_setup);* softlockup watchdog start and stop. The arch must select the * SOFTLOCKUP_DETECTOR Kconfig. */ -int __weak watchdog_nmi_enable (unsigned int cpu) +void __weak watchdog_nmi_enable (unsigned int cpu) {hardlockup_detector_perf_enable (); -return 0 ; }void __weak watchdog_nmi_disable (unsigned int cpu)
Signature · 1 line
2.29.2
Quoted 7 lines · Pingfan Liu
The only caller does not handle the return value of
watchdog_nmi_enable(). If there is an error, it seems to be reported by arch specific code.Hence changing
watchdog_nmi_enable()return value from int to void.Signed-off-by Pingfan Liu <[email protected]>
Looks good to me:
Best Regards,
Petr
Hi Petr,
Thank you for reviewing.
But I am composing a series, which may overstep this patch. So please drop this patch, and sorry for inconvenience.
Regards,
Pingfan
Quoted 16 lines · Petr Mladek
Quoted 7 lines · Pingfan Liu
The only caller does not handle the return value of
watchdog_nmi_enable(). If there is an error, it seems to be reported by arch specific code.Hence changing
watchdog_nmi_enable()return value from int to void.Signed-off-by Pingfan Liu <[email protected]>Looks good to me:
Reviewed-by Petr Mladek <[email protected]>Best Regards,
Petr