All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: Fix warning when including netdev.h on DM systems
@ 2020-04-04 10:30 Marek Vasut
  0 siblings, 0 replies; only message in thread
From: Marek Vasut @ 2020-04-04 10:30 UTC (permalink / raw)
  To: u-boot

If the DM_ETH is enabled and netdev.h is included somewhere, the
struct eth_device may not be defined, yet it is used in the header
file as an argument to fecmxc_register_mii_postcall. Add forward
declaration to remove the warning.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
---
 include/netdev.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/netdev.h b/include/netdev.h
index 68a3fceab6..f2d21c45d0 100644
--- a/include/netdev.h
+++ b/include/netdev.h
@@ -125,6 +125,7 @@ int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr,
 /*
  * Allow FEC to fine-tune MII configuration on boards which require this.
  */
+struct eth_device;
 int fecmxc_register_mii_postcall(struct eth_device *dev, int (*cb)(int));
 #endif
 
-- 
2.25.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-04 10:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-04 10:30 [PATCH] net: Fix warning when including netdev.h on DM systems Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.