arch: include linux/cpu.h for trap_init() prototype
authorArnd Bergmann <arnd@arndb.de>
Mon, 6 Nov 2023 09:44:55 +0000 (10:44 +0100)
committerArnd Bergmann <arnd@arndb.de>
Thu, 23 Nov 2023 10:32:31 +0000 (11:32 +0100)
some architectures run into a -Wmissing-prototypes warning
for trap_init()

arch/microblaze/kernel/traps.c:21:6: warning: no previous prototype for 'trap_init' [-Wmissing-prototypes]

Include the right header to avoid this consistently, removing
the extra declarations on m68k and x86 that were added as local
workarounds already.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/alpha/kernel/traps.c
arch/csky/include/asm/traps.h
arch/csky/kernel/traps.c
arch/m68k/coldfire/vectors.c
arch/m68k/coldfire/vectors.h [deleted file]
arch/microblaze/kernel/traps.c
arch/sparc/kernel/traps_32.c
arch/sparc/kernel/traps_64.c
arch/x86/include/asm/traps.h
arch/x86/kernel/traps.c

index d9a67b370e047622e4ef55c96e6342b11bebe35d..7fc72aeb7398c7361bb9ae80dbf4e0f72d637e1c 100644 (file)
@@ -9,6 +9,7 @@
  * This file initializes the trap entry points
  */
 
+#include <linux/cpu.h>
 #include <linux/jiffies.h>
 #include <linux/mm.h>
 #include <linux/sched/signal.h>
index 732c4aaa2e2601362f9e2f322dad1befb8d5ac5f..495ce318d5699d0774e0095d66693376cc93d3cf 100644 (file)
@@ -55,6 +55,4 @@ asmlinkage void trap_c(struct pt_regs *regs);
 asmlinkage void do_notify_resume(struct pt_regs *regs,
                        unsigned long thread_info_flags);
 
-void trap_init(void);
-
 #endif /* __ASM_CSKY_TRAPS_H */
index 6e426fba01193baf60870f6a60a95708fcc2a69a..c2246b07cc9c16a35d79bc45c1d34dcc94bbf8e0 100644 (file)
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
 
+#include <linux/cpu.h>
 #include <linux/sched.h>
 #include <linux/signal.h>
 #include <linux/kernel.h>
index c26c255b530d8acf2a3ce1af905a7a2f4222db3f..4321fd89d83e16f11a8decf7efa0a185e0c783bd 100644 (file)
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/irq.h>
+#include <linux/cpu.h>
 #include <asm/traps.h>
 #include <asm/machdep.h>
 #include <asm/coldfire.h>
 #include <asm/mcfsim.h>
 #include <asm/mcfwdebug.h>
 
-#include "vectors.h"
-
 /***************************************************************************/
 
 #ifdef TRAP_DBG_INTERRUPT
diff --git a/arch/m68k/coldfire/vectors.h b/arch/m68k/coldfire/vectors.h
deleted file mode 100644 (file)
index 0b01450..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-void trap_init(void);
index 94b6fe93147d5a9644c4694ca8127637dbebcf25..080aa769218db4c098f4ef57af9bfd9d268be9a7 100644 (file)
@@ -8,6 +8,7 @@
  * for more details.
  */
 
+#include <linux/cpu.h>
 #include <linux/export.h>
 #include <linux/kernel.h>
 #include <linux/kallsyms.h>
index 179aabfa712ea06f7e92abe5539fd34b95445e16..bb149f6cc34b8b2ffc9d9191a4af6f9a3b80f16b 100644 (file)
@@ -10,6 +10,7 @@
  * I hate traps on the sparc, grrr...
  */
 
+#include <linux/cpu.h>
 #include <linux/sched/mm.h>
 #include <linux/sched/debug.h>
 #include <linux/mm_types.h>
index 08ffd17d5ec34050bdda1d80d927a60ebe5cc99e..3631899f239473028ebfc51d76b94ab0ddcfa3e9 100644 (file)
@@ -9,6 +9,7 @@
  * I like traps on v9, :))))
  */
 
+#include <linux/cpu.h>
 #include <linux/extable.h>
 #include <linux/sched/mm.h>
 #include <linux/sched/debug.h>
index b1c9cea6ba88bb46b77feaa04d955dc3b6d3d14d..1f1deaecd364b813e4ad42c3c7a634e95059388b 100644 (file)
@@ -14,7 +14,6 @@
 asmlinkage __visible notrace struct pt_regs *sync_regs(struct pt_regs *eregs);
 asmlinkage __visible notrace
 struct pt_regs *fixup_bad_iret(struct pt_regs *bad_regs);
-void __init trap_init(void);
 asmlinkage __visible noinstr struct pt_regs *vc_switch_off_ist(struct pt_regs *eregs);
 #endif
 
index c876f1d36a81a7518214c3215ae08830d47e55f5..b0737a15c470251b1222a52afe28e0d0a82b74d2 100644 (file)
@@ -37,6 +37,7 @@
 #include <linux/nmi.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
+#include <linux/cpu.h>
 #include <linux/io.h>
 #include <linux/hardirq.h>
 #include <linux/atomic.h>