Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arch: include linux/cpu.h for trap_init() prototype

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>

+7 -8
+1
arch/alpha/kernel/traps.c
··· 9 9 * This file initializes the trap entry points 10 10 */ 11 11 12 + #include <linux/cpu.h> 12 13 #include <linux/jiffies.h> 13 14 #include <linux/mm.h> 14 15 #include <linux/sched/signal.h>
-2
arch/csky/include/asm/traps.h
··· 55 55 asmlinkage void do_notify_resume(struct pt_regs *regs, 56 56 unsigned long thread_info_flags); 57 57 58 - void trap_init(void); 59 - 60 58 #endif /* __ASM_CSKY_TRAPS_H */
+1
arch/csky/kernel/traps.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. 3 3 4 + #include <linux/cpu.h> 4 5 #include <linux/sched.h> 5 6 #include <linux/signal.h> 6 7 #include <linux/kernel.h>
+1 -2
arch/m68k/coldfire/vectors.c
··· 12 12 #include <linux/kernel.h> 13 13 #include <linux/init.h> 14 14 #include <linux/irq.h> 15 + #include <linux/cpu.h> 15 16 #include <asm/traps.h> 16 17 #include <asm/machdep.h> 17 18 #include <asm/coldfire.h> 18 19 #include <asm/mcfsim.h> 19 20 #include <asm/mcfwdebug.h> 20 - 21 - #include "vectors.h" 22 21 23 22 /***************************************************************************/ 24 23
-3
arch/m68k/coldfire/vectors.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 2 - 3 - void trap_init(void);
+1
arch/microblaze/kernel/traps.c
··· 8 8 * for more details. 9 9 */ 10 10 11 + #include <linux/cpu.h> 11 12 #include <linux/export.h> 12 13 #include <linux/kernel.h> 13 14 #include <linux/kallsyms.h>
+1
arch/sparc/kernel/traps_32.c
··· 10 10 * I hate traps on the sparc, grrr... 11 11 */ 12 12 13 + #include <linux/cpu.h> 13 14 #include <linux/sched/mm.h> 14 15 #include <linux/sched/debug.h> 15 16 #include <linux/mm_types.h>
+1
arch/sparc/kernel/traps_64.c
··· 9 9 * I like traps on v9, :)))) 10 10 */ 11 11 12 + #include <linux/cpu.h> 12 13 #include <linux/extable.h> 13 14 #include <linux/sched/mm.h> 14 15 #include <linux/sched/debug.h>
-1
arch/x86/include/asm/traps.h
··· 14 14 asmlinkage __visible notrace struct pt_regs *sync_regs(struct pt_regs *eregs); 15 15 asmlinkage __visible notrace 16 16 struct pt_regs *fixup_bad_iret(struct pt_regs *bad_regs); 17 - void __init trap_init(void); 18 17 asmlinkage __visible noinstr struct pt_regs *vc_switch_off_ist(struct pt_regs *eregs); 19 18 #endif 20 19
+1
arch/x86/kernel/traps.c
··· 37 37 #include <linux/nmi.h> 38 38 #include <linux/mm.h> 39 39 #include <linux/smp.h> 40 + #include <linux/cpu.h> 40 41 #include <linux/io.h> 41 42 #include <linux/hardirq.h> 42 43 #include <linux/atomic.h>