[PATCH] of: mdio: Add missing inline to of_mdiobus_child_is_phy() dummy

From: Geert Uytterhoeven
Date: Mon Dec 23 2019 - 05:03:29 EST


If CONFIG_OF_MDIO=n:

drivers/net/phy/mdio_bus.c:23:
include/linux/of_mdio.h:58:13: warning: âof_mdiobus_child_is_phyâ defined but not used [-Wunused-function]
static bool of_mdiobus_child_is_phy(struct device_node *child)
^~~~~~~~~~~~~~~~~~~~~~~

Fix this by adding the missing "inline" keyword.

Fixes: 0aa4d016c043d16a ("of: mdio: export of_mdiobus_child_is_phy")
Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
---
include/linux/of_mdio.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h
index 79bc82e30c02333d..491a2b7e77c1e906 100644
--- a/include/linux/of_mdio.h
+++ b/include/linux/of_mdio.h
@@ -55,7 +55,7 @@ static inline int of_mdio_parse_addr(struct device *dev,
}

#else /* CONFIG_OF_MDIO */
-static bool of_mdiobus_child_is_phy(struct device_node *child)
+static inline bool of_mdiobus_child_is_phy(struct device_node *child)
{
return false;
}
--
2.17.1