Skip to contentSkip to conversation

xen: xen_debug_interrupt prototype to global header

PATCH In review Arnd Bergmann 2 participants 2 messages May 17, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: xen_debug_interrupt prototype to global header

From: Arnd Bergmann <[email protected]>

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.

---
 arch/x86/xen/xen-ops.h | 2 --
 include/xen/events.h   | 3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)
arch/x86/xen/xen-ops.h +0 -2
index 84a35ff1e0c9..0f71ee3fe86b 100644
@@ -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);
include/xen/events.h +3 -0
index 44c2855c76d1..ac1281c5ead6 100644
@@ -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 */
Signature · 1 line
2.39.2
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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.

Quoted 33 lines
---
 arch/x86/xen/xen-ops.h | 2 --
 include/xen/events.h   | 3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)
arch/x86/xen/xen-ops.h +0 -2
index 84a35ff1e0c9..0f71ee3fe86b 100644
@@ -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);
include/xen/events.h +3 -0
index 44c2855c76d1..ac1281c5ead6 100644
@@ -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 */
Signature · 1 line
2.39.2