[PATCH v2 17/23] powerpc/watchdog: Declare soft_nmi_interrupt() prototype
Cédric Le Goater
clg at kaod.org
Tue Jan 5 01:32:00 AEDT 2021
soft_nmi_interrupt() usage requires PPC_WATCHDOG to be configured.
Check the CONFIG definition to declare the prototype.
It fixes this W=1 compile error :
../arch/powerpc/kernel/watchdog.c:250:6: error: no previous prototype for ‘soft_nmi_interrupt’ [-Werror=missing-prototypes]
250 | void soft_nmi_interrupt(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~
Cc: Nicholas Piggin <npiggin at gmail.com>
Signed-off-by: Cédric Le Goater <clg at kaod.org>
---
arch/powerpc/include/asm/nmi.h | 1 +
arch/powerpc/kernel/watchdog.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/powerpc/include/asm/nmi.h b/arch/powerpc/include/asm/nmi.h
index 84b4cfe73edd..63eccea93796 100644
--- a/arch/powerpc/include/asm/nmi.h
+++ b/arch/powerpc/include/asm/nmi.h
@@ -4,6 +4,7 @@
#ifdef CONFIG_PPC_WATCHDOG
extern void arch_touch_nmi_watchdog(void);
+void soft_nmi_interrupt(struct pt_regs *regs);
#else
static inline void arch_touch_nmi_watchdog(void) {}
#endif
diff --git a/arch/powerpc/kernel/watchdog.c b/arch/powerpc/kernel/watchdog.c
index af3c15a1d41e..3ae13c2a10cf 100644
--- a/arch/powerpc/kernel/watchdog.c
+++ b/arch/powerpc/kernel/watchdog.c
@@ -27,6 +27,7 @@
#include <linux/smp.h>
#include <asm/paca.h>
+#include <asm/nmi.h>
/*
* The powerpc watchdog ensures that each CPU is able to service timers.
--
2.26.2
More information about the Linuxppc-dev
mailing list