Commit 73021118 authored by Lecopzer Chen's avatar Lecopzer Chen Committed by Andrew Morton
Browse files

watchdog/hardlockup: change watchdog_nmi_enable() to void

Nobody cares about the return value of watchdog_nmi_enable(), changing its
prototype to void.

Link: https://lkml.kernel.org/r/20230519101840.v5.4.Ic3a19b592eb1ac4c6f6eade44ffd943e8637b6e5@changeid


Signed-off-by: default avatarPingfan Liu <kernelfans@gmail.com>
Signed-off-by: default avatarLecopzer Chen <lecopzer.chen@mediatek.com>
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
Acked-by: default avatarNicholas Piggin <npiggin@gmail.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Colin Cross <ccross@android.com>
Cc: Daniel Thompson <daniel.thompson@linaro.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Guenter Roeck <groeck@chromium.org>
Cc: Ian Rogers <irogers@google.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Masayoshi Mizuma <msys.mizuma@gmail.com>
Cc: Matthias Kaehlcke <mka@chromium.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: "Ravi V. Shankar" <ravi.v.shankar@intel.com>
Cc: Ricardo Neri <ricardo.neri@intel.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Stephen Boyd <swboyd@chromium.org>
Cc: Sumit Garg <sumit.garg@linaro.org>
Cc: Tzung-Bi Shih <tzungbi@chromium.org>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 810b560e
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -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.
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −2
Original line number Diff line number Diff line
@@ -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)