Skip to contentSkip to conversation

Staging:board:board: fix implicit declaration of function

PATCH In review Nadim Almas 3 participants 3 messages Oct 23, 2016 – Oct 24, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging:board:board: fix implicit declaration of function

implicit declaration of function ‘of_find_all_nodes’ reported by sparse

---
 drivers/staging/board/board.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/board/board.c +1 -0
index 86dc411..6978db5 100644
@@ -22,6 +22,7 @@
 
 #include "board.h"
 
+struct device_node *of_find_all_nodes(struct device_node *);
 static struct device_node *irqc_node __initdata;
 static unsigned int irqc_base __initdata;
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 2 lines · Nadim Almas

implicit declaration of function ‘of_find_all_nodes’ reported by sparse

No. Include the correct header file instead.

regards,
dan carpenter

#2 lore raw
Quoted 5 lines · Dan Carpenter
Quoted 2 lines · Nadim Almas

implicit declaration of function ‘of_find_all_nodes’ reported by sparse

No. Include the correct header file instead.

drivers/staging/board/board.c already includes <linux/of.h>, which provides the prototype, but only if CONFIG_OF=y.

However, STAGING_BOARD depends on OF_ADDRESS and OF_IRQ, which both depend on OF. So how can this happen??

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds