From: Arnd Bergmann <arnd@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
Masahiro Yamada <masahiroy@kernel.org>,
linux-kbuild@vger.kernel.org
Cc: "Mark Rutland" <mark.rutland@arm.com>,
"Juri Lelli" <juri.lelli@redhat.com>,
linux-fbdev@vger.kernel.org, x86@kernel.org,
loongarch@lists.linux.dev, linux-sh@vger.kernel.org,
"Peter Zijlstra" <peterz@infradead.org>,
"Catalin Marinas" <catalin.marinas@arm.com>,
dri-devel@lists.freedesktop.org, netdev@vger.kernel.org,
"Guo Ren" <guoren@kernel.org>,
"Anil S Keshavamurthy" <anil.s.keshavamurthy@intel.com>,
sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org,
"Vincenzo Frascino" <vincenzo.frascino@arm.com>,
"Will Deacon" <will@kernel.org>,
"Greg Ungerer" <gerg@linux-m68k.org>,
"Nicolas Schier" <nicolas@fjasle.eu>,
linux-s390@vger.kernel.org,
"Alexander Gordeev" <agordeev@linux.ibm.com>,
"Vincent Guittot" <vincent.guittot@linaro.org>,
"Helge Deller" <deller@gmx.de>,
"Huacai Chen" <chenhuacai@kernel.org>,
"Russell King" <linux@armlinux.org.uk>,
"Ard Biesheuvel" <ardb@kernel.org>,
linux-bcachefs@vger.kernel.org, "Ingo Molnar" <mingo@redhat.com>,
"Vineet Gupta" <vgupta@kernel.org>,
"Naveen N. Rao" <naveen.n.rao@linu>
Subject: [PATCH 08/22] [v2] arch: consolidate arch_irq_work_raise prototypes
Date: Wed, 8 Nov 2023 13:58:29 +0100 [thread overview]
Message-ID: <20231108125843.3806765-9-arnd@kernel.org> (raw)
In-Reply-To: <20231108125843.3806765-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
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.
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Guo Ren <guoren@kernel.org>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v2: clarify changelog text
---
arch/arm/include/asm/irq_work.h | 2 --
arch/arm64/include/asm/irq_work.h | 2 --
arch/csky/include/asm/irq_work.h | 2 +-
arch/powerpc/include/asm/irq_work.h | 1 -
arch/riscv/include/asm/irq_work.h | 2 +-
arch/s390/include/asm/irq_work.h | 2 --
arch/x86/include/asm/irq_work.h | 1 -
include/linux/irq_work.h | 3 +++
8 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/arch/arm/include/asm/irq_work.h b/arch/arm/include/asm/irq_work.h
index 3149e4dc1b54..8895999834cc 100644
--- a/arch/arm/include/asm/irq_work.h
+++ b/arch/arm/include/asm/irq_work.h
@@ -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 */
diff --git a/arch/arm64/include/asm/irq_work.h b/arch/arm64/include/asm/irq_work.h
index 81bbfa3a035b..a1020285ea75 100644
--- a/arch/arm64/include/asm/irq_work.h
+++ b/arch/arm64/include/asm/irq_work.h
@@ -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;
diff --git a/arch/csky/include/asm/irq_work.h b/arch/csky/include/asm/irq_work.h
index 33aaf39d6f94..d39fcc1f5395 100644
--- a/arch/csky/include/asm/irq_work.h
+++ b/arch/csky/include/asm/irq_work.h
@@ -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 */
diff --git a/arch/powerpc/include/asm/irq_work.h b/arch/powerpc/include/asm/irq_work.h
index b8b0be8f1a07..c6d3078bd8c3 100644
--- a/arch/powerpc/include/asm/irq_work.h
+++ b/arch/powerpc/include/asm/irq_work.h
@@ -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 */
diff --git a/arch/riscv/include/asm/irq_work.h b/arch/riscv/include/asm/irq_work.h
index b53891964ae0..b27a4d64fc6a 100644
--- a/arch/riscv/include/asm/irq_work.h
+++ b/arch/riscv/include/asm/irq_work.h
@@ -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 */
diff --git a/arch/s390/include/asm/irq_work.h b/arch/s390/include/asm/irq_work.h
index 603783766d0a..f00c9f610d5a 100644
--- a/arch/s390/include/asm/irq_work.h
+++ b/arch/s390/include/asm/irq_work.h
@@ -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 */
diff --git a/arch/x86/include/asm/irq_work.h b/arch/x86/include/asm/irq_work.h
index 800ffce0db29..6b4d36c95165 100644
--- a/arch/x86/include/asm/irq_work.h
+++ b/arch/x86/include/asm/irq_work.h
@@ -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)
{
diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h
index 8cd11a223260..136f2980cba3 100644
--- a/include/linux/irq_work.h
+++ b/include/linux/irq_work.h
@@ -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) { }
--
2.39.2
next prev parent reply other threads:[~2023-11-08 21:48 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-08 12:58 [PATCH 00/22] -Wmissing-prototype warning fixes Arnd Bergmann
2023-11-08 12:58 ` [PATCH 01/22] [RESEND^2] ida: make 'ida_dump' static Arnd Bergmann
2023-11-08 12:58 ` [PATCH 02/22] [RESEND^2] jffs2: mark __jffs2_dbg_superblock_counts() static Arnd Bergmann
2023-11-09 1:07 ` Zhihao Cheng
2023-11-08 12:58 ` [PATCH 03/22] [RESEND] kprobes: unify kprobes_exceptions_nofify() prototypes Arnd Bergmann
2023-11-08 23:20 ` Masami Hiramatsu
2023-11-08 12:58 ` [PATCH 04/22] [RESEND] time: make sysfs_get_uname() function visible in header Arnd Bergmann
2023-11-10 12:41 ` Uwe Kleine-König
2023-11-08 12:58 ` [PATCH 05/22] [RESEND] parport: gsc: mark init function static Arnd Bergmann
2023-11-08 12:58 ` [PATCH 06/22] [RESEND] stackleak: add declarations for global functions Arnd Bergmann
2023-11-08 12:58 ` [PATCH 07/22] [RESEND] sched: fair: move unused stub functions to header Arnd Bergmann
2023-11-08 12:58 ` Arnd Bergmann [this message]
2024-01-10 9:03 ` [PATCH 08/22] [v2] arch: consolidate arch_irq_work_raise prototypes Geert Uytterhoeven
2024-01-10 10:20 ` Arnd Bergmann
2023-11-08 12:58 ` [PATCH 09/22] [v2] arch: fix asm-offsets.c building with -Wmissing-prototypes Arnd Bergmann
2023-11-08 19:10 ` Sam Ravnborg
2023-11-08 12:58 ` [PATCH 10/22] microblaze: include linux/cpu.h for trap_init() prototype Arnd Bergmann
[not found] ` <CAMuHMdXgdn_cMq0YeqPu3sUeM5cEYbCoodxu8XwCGiRJ-vFsyw@mail.gmail.com>
2023-11-08 21:07 ` Arnd Bergmann
2023-11-08 12:58 ` [PATCH 11/22] x86: sta2x11: include header for sta2x11_get_instance() prototype Arnd Bergmann
2023-11-08 12:58 ` [PATCH 12/22] csky: fix arch_jump_label_transform_static override Arnd Bergmann
2023-11-12 4:21 ` Guo Ren
2023-11-08 12:58 ` [PATCH 13/22] arch: add do_page_fault prototypes Arnd Bergmann
2023-11-08 12:58 ` [PATCH 14/22] arch: add missing prepare_ftrace_return() prototypes Arnd Bergmann
2023-11-08 12:58 ` [PATCH 15/22] arch: vdso: consolidate gettime prototypes Arnd Bergmann
2023-11-08 18:31 ` Christophe Leroy
2023-11-08 19:37 ` Arnd Bergmann
2023-11-09 7:50 ` Christophe Leroy
2023-11-09 10:18 ` Michael Ellerman
2023-11-09 10:49 ` Christophe Leroy
2023-11-09 12:23 ` Michael Ellerman
2023-11-10 10:16 ` Vincenzo Frascino
2023-11-24 12:04 ` Mark Brown
2023-11-08 12:58 ` [PATCH 16/22] bcachefs: mark bch2_target_to_text_sb() static Arnd Bergmann
2023-11-08 20:19 ` Kent Overstreet
2023-11-08 12:58 ` [PATCH 17/22] powerpc: ps3: move udbg_shutdown_ps3gelic prototype Arnd Bergmann
2023-11-08 14:18 ` Geoff Levand
2023-11-08 15:10 ` Jakub Kicinski
2023-11-08 12:58 ` [PATCH 18/22] powerpc: pasemi: mark pas_shutdown() static Arnd Bergmann
2023-11-08 12:58 ` [PATCH 19/22] powerpc: powermac: mark smp_psurge_{give,take}_timebase static Arnd Bergmann
2023-11-08 12:58 ` [PATCH 20/22] usb: fsl-mph-dr-of: mark fsl_usb2_mpc5121_init() static Arnd Bergmann
2023-11-21 14:12 ` Greg Kroah-Hartman
2023-11-08 12:58 ` [PATCH 21/22] fbdev/fsl-diu-fb: mark wr_reg_wa() static Arnd Bergmann
2023-11-08 12:58 ` [PATCH 22/22] Makefile.extrawarn: turn on missing-prototypes globally Arnd Bergmann
2023-12-07 12:38 ` (subset) [PATCH 00/22] -Wmissing-prototype warning fixes Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231108125843.3806765-9-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=anil.s.keshavamurthy@intel.com \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=chenhuacai@kernel.org \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=gerg@linux-m68k.org \
--cc=guoren@kernel.org \
--cc=juri.lelli@redhat.com \
--cc=linux-bcachefs@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=loongarch@lists.linux.dev \
--cc=mark.rutland@arm.com \
--cc=masahiroy@kernel.org \
--cc=mingo@redhat.com \
--cc=naveen.n.rao@linu \
--cc=netdev@vger.kernel.org \
--cc=nicolas@fjasle.eu \
--cc=peterz@infradead.org \
--cc=sparclinux@vger.kernel.org \
--cc=vgupta@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=vincenzo.frascino@arm.com \
--cc=will@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).