* [PATCH] x86/irq: fix [-Wvisibility] warnings
@ 2024-01-09 14:10 Tudor Ambarus
2024-01-25 18:36 ` Thomas Gleixner
0 siblings, 1 reply; 2+ messages in thread
From: Tudor Ambarus @ 2024-01-09 14:10 UTC (permalink / raw)
To: tglx, mingo, bp, dave.hansen
Cc: x86, hpa, akpm, mhocko, dianders, arnd, linux-kernel,
willmcvicker, andre.draszik, peter.griffin, kernel-team,
Tudor Ambarus, kernel test robot
Sorting include entries in alphabetical order for
drivers/tty/serial/samsung_tty.c revealed the following warnings:
In file included from drivers/tty/serial/samsung_tty.c:24:
>> arch/x86/include/asm/irq.h:39:56: warning: declaration of 'struct pt_regs' will not be visible outside of this function [-Wvisibility]
39 | extern void __handle_irq(struct irq_desc *desc, struct pt_regs *regs);
| ^
>> arch/x86/include/asm/irq.h:44:50: warning: declaration of 'struct cpumask' will not be visible outside of this function [-Wvisibility]
44 | void arch_trigger_cpumask_backtrace(const struct cpumask *mask,
| ^
2 warnings generated.
Fix them by including <linux/cpumask.h> and by adding a forward
declaration for ``struct pt_regs``.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202401090827.6Qt43Hqk-lkp@intel.com/
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
---
arch/x86/include/asm/irq.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/include/asm/irq.h b/arch/x86/include/asm/irq.h
index 836c170d3087..4b689cec473e 100644
--- a/arch/x86/include/asm/irq.h
+++ b/arch/x86/include/asm/irq.h
@@ -10,6 +10,7 @@
#include <asm/apicdef.h>
#include <asm/irq_vectors.h>
+#include <linux/cpumask.h>
/*
* The irq entry code is in the noinstr section and the start/end of
@@ -36,6 +37,8 @@ extern void kvm_set_posted_intr_wakeup_handler(void (*handler)(void));
extern void (*x86_platform_ipi_callback)(void);
extern void native_init_IRQ(void);
+struct pt_regs;
+
extern void __handle_irq(struct irq_desc *desc, struct pt_regs *regs);
extern void init_ISA_irqs(void);
--
2.43.0.472.g3155946c3a-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/irq: fix [-Wvisibility] warnings
2024-01-09 14:10 [PATCH] x86/irq: fix [-Wvisibility] warnings Tudor Ambarus
@ 2024-01-25 18:36 ` Thomas Gleixner
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Gleixner @ 2024-01-25 18:36 UTC (permalink / raw)
To: Tudor Ambarus, mingo, bp, dave.hansen
Cc: x86, hpa, akpm, mhocko, dianders, arnd, linux-kernel,
willmcvicker, andre.draszik, peter.griffin, kernel-team,
Tudor Ambarus, kernel test robot
On Tue, Jan 09 2024 at 14:10, Tudor Ambarus wrote:
>
> #include <asm/apicdef.h>
> #include <asm/irq_vectors.h>
> +#include <linux/cpumask.h>
Why does this need the include?
> 44 | void arch_trigger_cpumask_backtrace(const struct cpumask *mask,
That's a pointer so a simple forward declaration should work, no?
Thanks,
tglx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-25 18:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-09 14:10 [PATCH] x86/irq: fix [-Wvisibility] warnings Tudor Ambarus
2024-01-25 18:36 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox