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

arch: consolidate arch_irq_work_raise prototypes

The prototype was hidden in an #ifdef on x86, which causes a warning:

kernel/irq_work.c:72:13: error: no previous prototype for 'arch_irq_work_raise' [-Werror=missing-prototypes]

Some architectures have a working prototype, while others don't.
Fix this by providing it in only one place that is always visible.

Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Guo Ren <guoren@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+5 -10
-2
arch/arm/include/asm/irq_work.h
··· 9 9 return is_smp(); 10 10 } 11 11 12 - extern void arch_irq_work_raise(void); 13 - 14 12 #endif /* _ASM_ARM_IRQ_WORK_H */
-2
arch/arm64/include/asm/irq_work.h
··· 2 2 #ifndef __ASM_IRQ_WORK_H 3 3 #define __ASM_IRQ_WORK_H 4 4 5 - extern void arch_irq_work_raise(void); 6 - 7 5 static inline bool arch_irq_work_has_interrupt(void) 8 6 { 9 7 return true;
+1 -1
arch/csky/include/asm/irq_work.h
··· 7 7 { 8 8 return true; 9 9 } 10 - extern void arch_irq_work_raise(void); 10 + 11 11 #endif /* __ASM_CSKY_IRQ_WORK_H */
-1
arch/powerpc/include/asm/irq_work.h
··· 6 6 { 7 7 return true; 8 8 } 9 - extern void arch_irq_work_raise(void); 10 9 11 10 #endif /* _ASM_POWERPC_IRQ_WORK_H */
+1 -1
arch/riscv/include/asm/irq_work.h
··· 6 6 { 7 7 return IS_ENABLED(CONFIG_SMP); 8 8 } 9 - extern void arch_irq_work_raise(void); 9 + 10 10 #endif /* _ASM_RISCV_IRQ_WORK_H */
-2
arch/s390/include/asm/irq_work.h
··· 7 7 return true; 8 8 } 9 9 10 - void arch_irq_work_raise(void); 11 - 12 10 #endif /* _ASM_S390_IRQ_WORK_H */
-1
arch/x86/include/asm/irq_work.h
··· 9 9 { 10 10 return boot_cpu_has(X86_FEATURE_APIC); 11 11 } 12 - extern void arch_irq_work_raise(void); 13 12 #else 14 13 static inline bool arch_irq_work_has_interrupt(void) 15 14 {
+3
include/linux/irq_work.h
··· 66 66 void irq_work_run(void); 67 67 bool irq_work_needs_cpu(void); 68 68 void irq_work_single(void *arg); 69 + 70 + void arch_irq_work_raise(void); 71 + 69 72 #else 70 73 static inline bool irq_work_needs_cpu(void) { return false; } 71 74 static inline void irq_work_run(void) { }