Skip to contentSkip to conversation

cmd: irq: Move do_irqinfo() prototype to a header file

PATCH In review Andy Shevchenko 3 participants 3 messages Oct 5, 2024 – Oct 18, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cmd: irq: Move do_irqinfo() prototype to a header file

Move do_irqinfo() prototype to a header file, otherwise compiler is not happy:

arch/x86/lib/interrupts.c:130:5: warning: no previous prototype for ‘do_irqinfo’ [-Wmissing-prototypes]

---
 cmd/irq.c          | 3 ---
 include/irq_func.h | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)
cmd/irq.c +0 -3
index 655aba576a8b..da223b4b2cce 100644
@@ -29,9 +29,6 @@ U_BOOT_CMD(
 	"[on, off]"
 );
 
-/* Implemented in $(CPU)/interrupts.c */
-int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
-
 U_BOOT_CMD(
 	irqinfo,    1,    1,     do_irqinfo,
 	"print information about IRQs",
include/irq_func.h +3 -0
index c7c4babbfc90..28ec0bd83038 100644
@@ -23,4 +23,7 @@ void reset_timer(void);
 void enable_interrupts(void);
 int disable_interrupts(void);
 
+/* Implemented in $(CPU)/interrupts.c */
+int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+
 #endif
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Andy Shevchenko

Move do_irqinfo() prototype to a header file, otherwise compiler is not happy:

Quoted 8 lines

arch/x86/lib/interrupts.c:130:5: warning: no previous prototype for ‘do_irqinfo’ [-Wmissing-prototypes]

---
 cmd/irq.c          | 3 ---
 include/irq_func.h | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)
#2 lore raw
In reply to Andy Shevchenko
Quoted 6 lines · Andy Shevchenko

Move do_irqinfo() prototype to a header file, otherwise compiler is not happy:

arch/x86/lib/interrupts.c:130:5: warning: no previous prototype for ‘do_irqinfo’ [-Wmissing-prototypes]

Applied to u-boot/master, thanks!

Signature · 1 line
Tom