arch: consolidate arch_irq_work_raise prototypes
authorArnd Bergmann <arnd@arndb.de>
Wed, 8 Nov 2023 12:58:29 +0000 (13:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:14:17 +0000 (20:14 +0000)
[ Upstream commit 64bac5ea17d527872121adddfee869c7a0618f8f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/include/asm/irq_work.h
arch/arm64/include/asm/irq_work.h
arch/csky/include/asm/irq_work.h
arch/powerpc/include/asm/irq_work.h
arch/riscv/include/asm/irq_work.h
arch/s390/include/asm/irq_work.h
arch/x86/include/asm/irq_work.h
include/linux/irq_work.h

index 3149e4d..8895999 100644 (file)
@@ -9,6 +9,4 @@ static inline bool arch_irq_work_has_interrupt(void)
        return is_smp();
 }
 
-extern void arch_irq_work_raise(void);
-
 #endif /* _ASM_ARM_IRQ_WORK_H */
index 81bbfa3..a102028 100644 (file)
@@ -2,8 +2,6 @@
 #ifndef __ASM_IRQ_WORK_H
 #define __ASM_IRQ_WORK_H
 
-extern void arch_irq_work_raise(void);
-
 static inline bool arch_irq_work_has_interrupt(void)
 {
        return true;
index 33aaf39..d39fcc1 100644 (file)
@@ -7,5 +7,5 @@ static inline bool arch_irq_work_has_interrupt(void)
 {
        return true;
 }
-extern void arch_irq_work_raise(void);
+
 #endif /* __ASM_CSKY_IRQ_WORK_H */
index b8b0be8..c6d3078 100644 (file)
@@ -6,6 +6,5 @@ static inline bool arch_irq_work_has_interrupt(void)
 {
        return true;
 }
-extern void arch_irq_work_raise(void);
 
 #endif /* _ASM_POWERPC_IRQ_WORK_H */
index b538919..b27a4d6 100644 (file)
@@ -6,5 +6,5 @@ static inline bool arch_irq_work_has_interrupt(void)
 {
        return IS_ENABLED(CONFIG_SMP);
 }
-extern void arch_irq_work_raise(void);
+
 #endif /* _ASM_RISCV_IRQ_WORK_H */
index 6037837..f00c9f6 100644 (file)
@@ -7,6 +7,4 @@ static inline bool arch_irq_work_has_interrupt(void)
        return true;
 }
 
-void arch_irq_work_raise(void);
-
 #endif /* _ASM_S390_IRQ_WORK_H */
index 800ffce..6b4d36c 100644 (file)
@@ -9,7 +9,6 @@ static inline bool arch_irq_work_has_interrupt(void)
 {
        return boot_cpu_has(X86_FEATURE_APIC);
 }
-extern void arch_irq_work_raise(void);
 #else
 static inline bool arch_irq_work_has_interrupt(void)
 {
index 8cd11a2..136f298 100644 (file)
@@ -66,6 +66,9 @@ void irq_work_sync(struct irq_work *work);
 void irq_work_run(void);
 bool irq_work_needs_cpu(void);
 void irq_work_single(void *arg);
+
+void arch_irq_work_raise(void);
+
 #else
 static inline bool irq_work_needs_cpu(void) { return false; }
 static inline void irq_work_run(void) { }