Thread (33 messages) 33 messages, 2 authors, 2021-01-04

Re: [PATCH 17/23] powerpc/watchdog: Declare soft_nmi_interrupt() prototype

From: Christophe Leroy <hidden>
Date: 2020-12-21 08:49:57


Le 21/12/2020 à 08:42, Cédric Le Goater a écrit :
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@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
  arch/powerpc/include/asm/asm-prototypes.h | 1 +
This is a misuse of asm/asm-prototypes.h

This file is for prototypes of ASM functions.

See discussion at 
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/1463534212-4879-2-git-send-email-dja@axtens.net/

quoted hunk ↗ jump to hunk
  arch/powerpc/kernel/watchdog.c            | 1 +
  2 files changed, 2 insertions(+)
diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h
index d0b832cbbec8..0f39eefbd5a5 100644
--- a/arch/powerpc/include/asm/asm-prototypes.h
+++ b/arch/powerpc/include/asm/asm-prototypes.h
@@ -84,6 +84,7 @@ void machine_check_exception(struct pt_regs *regs);
  void emulation_assist_interrupt(struct pt_regs *regs);
  long do_slb_fault(struct pt_regs *regs, unsigned long ea);
  void do_bad_slb_fault(struct pt_regs *regs, unsigned long ea, long err);
+void soft_nmi_interrupt(struct pt_regs *regs);
  
  /* signals, syscalls and interrupts */
  long sys_swapcontext(struct ucontext __user *old_ctx,
diff --git a/arch/powerpc/kernel/watchdog.c b/arch/powerpc/kernel/watchdog.c
index af3c15a1d41e..855716f563ac 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/asm-prototypes.h>
  
  /*
   * The powerpc watchdog ensures that each CPU is able to service timers.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help