devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: phy: Fix compile warning about of_mdiobus_child_is_phy
@ 2019-12-27 10:30 Tiezhu Yang
  2020-01-08 16:43 ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Tiezhu Yang @ 2019-12-27 10:30 UTC (permalink / raw)
  To: David S. Miller, Andrew Lunn, Florian Fainelli, Heiner Kallweit,
	Rob Herring, Frank Rowand, Antoine Tenart
  Cc: netdev, devicetree, linux-kernel

Fix the following compile warning when CONFIG_OF_MDIO is not set:

  CC      drivers/net/phy/mdio_bus.o
In file included from drivers/net/phy/mdio_bus.c:23:0:
./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)
             ^

Fixes: 0aa4d016c043 ("of: mdio: export of_mdiobus_child_is_phy")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 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 79bc82e..491a2b7 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.1.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: phy: Fix compile warning about of_mdiobus_child_is_phy
  2019-12-27 10:30 [PATCH] net: phy: Fix compile warning about of_mdiobus_child_is_phy Tiezhu Yang
@ 2020-01-08 16:43 ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2020-01-08 16:43 UTC (permalink / raw)
  To: Tiezhu Yang
  Cc: David S. Miller, Andrew Lunn, Florian Fainelli, Heiner Kallweit,
	Frank Rowand, Antoine Tenart, netdev, devicetree, linux-kernel

On Fri, Dec 27, 2019 at 06:30:59PM +0800, Tiezhu Yang wrote:
> Fix the following compile warning when CONFIG_OF_MDIO is not set:
> 
>   CC      drivers/net/phy/mdio_bus.o
> In file included from drivers/net/phy/mdio_bus.c:23:0:
> ./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)
>              ^
> 
> Fixes: 0aa4d016c043 ("of: mdio: export of_mdiobus_child_is_phy")
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
>  include/linux/of_mdio.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

A similar patch was already applied.

Rob

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-08 16:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-27 10:30 [PATCH] net: phy: Fix compile warning about of_mdiobus_child_is_phy Tiezhu Yang
2020-01-08 16:43 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).