* [PATCH] xen: xen_debug_interrupt prototype to global header
@ 2023-05-17 12:45 Arnd Bergmann
2023-05-17 19:41 ` Stefano Stabellini
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2023-05-17 12:45 UTC (permalink / raw)
To: Juergen Gross
Cc: Arnd Bergmann, Boris Ostrovsky, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
Stefano Stabellini, Oleksandr Tyshchenko, Jan Beulich,
Peter Zijlstra, David Woodhouse, xen-devel, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
The xen_debug_interrupt() function is only called on x86, which has a
prototype in an architecture specific header, but the definition also
exists on others, where the lack of a prototype causes a W=1 warning:
drivers/xen/events/events_2l.c:264:13: error: no previous prototype for 'xen_debug_interrupt' [-Werror=missing-prototypes]
Move the prototype into a global header instead to avoid this warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/x86/xen/xen-ops.h | 2 --
include/xen/events.h | 3 +++
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
index 84a35ff1e0c9..0f71ee3fe86b 100644
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -72,8 +72,6 @@ void xen_restore_time_memory_area(void);
void xen_init_time_ops(void);
void xen_hvm_init_time_ops(void);
-irqreturn_t xen_debug_interrupt(int irq, void *dev_id);
-
bool xen_vcpu_stolen(int vcpu);
void xen_vcpu_setup(int cpu);
diff --git a/include/xen/events.h b/include/xen/events.h
index 44c2855c76d1..ac1281c5ead6 100644
--- a/include/xen/events.h
+++ b/include/xen/events.h
@@ -138,4 +138,7 @@ int xen_test_irq_shared(int irq);
/* initialize Xen IRQ subsystem */
void xen_init_IRQ(void);
+
+irqreturn_t xen_debug_interrupt(int irq, void *dev_id);
+
#endif /* _XEN_EVENTS_H */
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xen: xen_debug_interrupt prototype to global header
2023-05-17 12:45 [PATCH] xen: xen_debug_interrupt prototype to global header Arnd Bergmann
@ 2023-05-17 19:41 ` Stefano Stabellini
0 siblings, 0 replies; 2+ messages in thread
From: Stefano Stabellini @ 2023-05-17 19:41 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Juergen Gross, Arnd Bergmann, Boris Ostrovsky, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
Stefano Stabellini, Oleksandr Tyshchenko, Jan Beulich,
Peter Zijlstra, David Woodhouse, xen-devel, linux-kernel
On Wed, 17 May 2023, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The xen_debug_interrupt() function is only called on x86, which has a
> prototype in an architecture specific header, but the definition also
> exists on others, where the lack of a prototype causes a W=1 warning:
>
> drivers/xen/events/events_2l.c:264:13: error: no previous prototype for 'xen_debug_interrupt' [-Werror=missing-prototypes]
>
> Move the prototype into a global header instead to avoid this warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
> ---
> arch/x86/xen/xen-ops.h | 2 --
> include/xen/events.h | 3 +++
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
> index 84a35ff1e0c9..0f71ee3fe86b 100644
> --- a/arch/x86/xen/xen-ops.h
> +++ b/arch/x86/xen/xen-ops.h
> @@ -72,8 +72,6 @@ void xen_restore_time_memory_area(void);
> void xen_init_time_ops(void);
> void xen_hvm_init_time_ops(void);
>
> -irqreturn_t xen_debug_interrupt(int irq, void *dev_id);
> -
> bool xen_vcpu_stolen(int vcpu);
>
> void xen_vcpu_setup(int cpu);
> diff --git a/include/xen/events.h b/include/xen/events.h
> index 44c2855c76d1..ac1281c5ead6 100644
> --- a/include/xen/events.h
> +++ b/include/xen/events.h
> @@ -138,4 +138,7 @@ int xen_test_irq_shared(int irq);
>
> /* initialize Xen IRQ subsystem */
> void xen_init_IRQ(void);
> +
> +irqreturn_t xen_debug_interrupt(int irq, void *dev_id);
> +
> #endif /* _XEN_EVENTS_H */
> --
> 2.39.2
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-17 19:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-17 12:45 [PATCH] xen: xen_debug_interrupt prototype to global header Arnd Bergmann
2023-05-17 19:41 ` Stefano Stabellini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox