Messages in this thread Patch in this message | | | From | Sasha Levin <> | Subject | [PATCH AUTOSEL 4.14 20/20] mdio_bus: unhide mdio_bus_init prototype | Date | Thu, 25 May 2023 14:45:16 -0400 |
| |
From: Arnd Bergmann <arnd@arndb.de>
[ Upstream commit 2e9f8ab68f42b059e80db71266c1675c07c664bd ]
mdio_bus_init() is either used as a local module_init() entry, or it gets called in phy_device.c. In the former case, there is no declaration, which causes a warning:
drivers/net/phy/mdio_bus.c:1371:12: error: no previous prototype for 'mdio_bus_init' [-Werror=missing-prototypes]
Remove the #ifdef around the declaration to avoid the warning..
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20230516194625.549249-4-arnd@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> --- include/linux/phy.h | 2 -- 1 file changed, 2 deletions(-)
diff --git a/include/linux/phy.h b/include/linux/phy.h index 8b6850707e629..1c1cc2ec0a7fc 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -940,10 +940,8 @@ int phy_ethtool_set_link_ksettings(struct net_device *ndev, const struct ethtool_link_ksettings *cmd); int phy_ethtool_nway_reset(struct net_device *ndev); -#if IS_ENABLED(CONFIG_PHYLIB) int __init mdio_bus_init(void); void mdio_bus_exit(void); -#endif extern struct bus_type mdio_bus_type; -- 2.39.2
| |