* [PATCH net] of: mdio: mark stub of_mdiobus_child_is_phy as inline
@ 2019-12-23 13:24 Jason A. Donenfeld
2019-12-23 15:24 ` Andrew Lunn
0 siblings, 1 reply; 2+ messages in thread
From: Jason A. Donenfeld @ 2019-12-23 13:24 UTC (permalink / raw)
To: netdev, linux-kernel, davem; +Cc: Jason A. Donenfeld, Antoine Tenart
The of_mdiobus_child_is_phy function was recently exported, with a stub
fallback added to simply return false as a static function. The inline
specifier was left out, leading to build time errors:
In file included from linux/include/linux/fs_enet_pd.h:21,
from linux/arch/powerpc/sysdev/fsl_soc.c:26:
linux/include/linux/of_mdio.h:58:13: error: ‘of_mdiobus_child_is_phy’ defined but not used [-Werror=unused-function]
58 | static bool of_mdiobus_child_is_phy(struct device_node *child)
| ^~~~~~~~~~
This commit simply adds the missing inline keyboard.
Fixes: 0aa4d016c043 ("of: mdio: export of_mdiobus_child_is_phy")
Cc: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
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 79bc82e30c02..491a2b7e77c1 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.24.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net] of: mdio: mark stub of_mdiobus_child_is_phy as inline
2019-12-23 13:24 [PATCH net] of: mdio: mark stub of_mdiobus_child_is_phy as inline Jason A. Donenfeld
@ 2019-12-23 15:24 ` Andrew Lunn
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2019-12-23 15:24 UTC (permalink / raw)
To: Jason A. Donenfeld; +Cc: netdev, linux-kernel, davem, Antoine Tenart
On Mon, Dec 23, 2019 at 02:24:43PM +0100, Jason A. Donenfeld wrote:
> The of_mdiobus_child_is_phy function was recently exported, with a stub
> fallback added to simply return false as a static function. The inline
> specifier was left out, leading to build time errors:
>
> In file included from linux/include/linux/fs_enet_pd.h:21,
> from linux/arch/powerpc/sysdev/fsl_soc.c:26:
> linux/include/linux/of_mdio.h:58:13: error: ‘of_mdiobus_child_is_phy’ defined but not used [-Werror=unused-function]
> 58 | static bool of_mdiobus_child_is_phy(struct device_node *child)
> | ^~~~~~~~~~
>
> This commit simply adds the missing inline keyboard.
Hi Jason
It is a good idea to search the netdev list before fixing things like
this:
https://lkml.org/lkml/2019/12/23/128
Andrew
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-23 15:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-23 13:24 [PATCH net] of: mdio: mark stub of_mdiobus_child_is_phy as inline Jason A. Donenfeld
2019-12-23 15:24 ` Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®