[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230519101840.v5.4.Ic3a19b592eb1ac4c6f6eade44ffd943e8637b6e5@changeid>
Date: Fri, 19 May 2023 10:18:28 -0700
From: Douglas Anderson <dianders@...omium.org>
To: Petr Mladek <pmladek@...e.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Matthias Kaehlcke <mka@...omium.org>,
kgdb-bugreport@...ts.sourceforge.net,
Stephane Eranian <eranian@...gle.com>, mpe@...erman.id.au,
Tzung-Bi Shih <tzungbi@...omium.org>,
Daniel Thompson <daniel.thompson@...aro.org>,
Mark Rutland <mark.rutland@....com>,
linuxppc-dev@...ts.ozlabs.org, Sumit Garg <sumit.garg@...aro.org>,
npiggin@...il.com, davem@...emloft.net,
Marc Zyngier <maz@...nel.org>,
Stephen Boyd <swboyd@...omium.org>, sparclinux@...r.kernel.org,
christophe.leroy@...roup.eu,
Catalin Marinas <catalin.marinas@....com>,
ravi.v.shankar@...el.com, Randy Dunlap <rdunlap@...radead.org>,
Pingfan Liu <kernelfans@...il.com>,
Guenter Roeck <groeck@...omium.org>,
Lecopzer Chen <lecopzer.chen@...iatek.com>,
Ian Rogers <irogers@...gle.com>, ito-yuichi@...itsu.com,
ricardo.neri@...el.com, linux-arm-kernel@...ts.infradead.org,
linux-perf-users@...r.kernel.org, Will Deacon <will@...nel.org>,
Chen-Yu Tsai <wens@...e.org>, linux-kernel@...r.kernel.org,
Masayoshi Mizuma <msys.mizuma@...il.com>,
Andi Kleen <ak@...ux.intel.com>,
Douglas Anderson <dianders@...omium.org>
Subject: [PATCH v5 04/18] watchdog/hardlockup: change watchdog_nmi_enable() to void
From: Lecopzer Chen <lecopzer.chen@...iatek.com>
Nobody cares about the return value of watchdog_nmi_enable(),
changing its prototype to void.
Signed-off-by: Pingfan Liu <kernelfans@...il.com>
Signed-off-by: Lecopzer Chen <lecopzer.chen@...iatek.com>
Reviewed-by: Petr Mladek <pmladek@...e.com>
Acked-by: Nicholas Piggin <npiggin@...il.com>
Signed-off-by: Douglas Anderson <dianders@...omium.org>
---
I yanked this patch from the mailing lists [1] into my series just to
make it easier to avoid conflicts between my series and the one adding
the arm64 perf hardlockup detector, in case someone wanted to test
them both together. This is a nice cleanup and could land together
with the rest of my series if that makes sense.
I changed the patch prefix to match others in my series.
[1] https://lore.kernel.org/r/20220903093415.15850-3-lecopzer.chen@mediatek.com/
(no changes since v4)
Changes in v4:
- Pulled ("change watchdog_nmi_enable() to void") into my series for v4.
arch/sparc/kernel/nmi.c | 8 +++-----
include/linux/nmi.h | 2 +-
kernel/watchdog.c | 3 +--
3 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c
index 060fff95a305..5dcf31f7e81f 100644
--- a/arch/sparc/kernel/nmi.c
+++ b/arch/sparc/kernel/nmi.c
@@ -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.
diff --git a/include/linux/nmi.h b/include/linux/nmi.h
index 771d77b62bc1..454fe99c4874 100644
--- a/include/linux/nmi.h
+++ b/include/linux/nmi.h
@@ -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);
void lockup_detector_reconfigure(void);
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 582d572e1379..c705a18b26bf 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -93,10 +93,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)
--
2.40.1.698.g37aff9b760-goog
Powered by blists - more mailing lists