Skip to content

Commit

Permalink
mdio_bus: unhide mdio_bus_init prototype
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnd Bergmann authored and Jakub Kicinski committed May 18, 2023
1 parent 89dcd87 commit 2e9f8ab
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions include/linux/phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -1900,10 +1900,8 @@ void phy_package_leave(struct phy_device *phydev);
int devm_phy_package_join(struct device *dev, struct phy_device *phydev,
int addr, size_t priv_size);

#if IS_ENABLED(CONFIG_PHYLIB)
int __init mdio_bus_init(void);
void mdio_bus_exit(void);
#endif

int phy_ethtool_get_strings(struct phy_device *phydev, u8 *data);
int phy_ethtool_get_sset_count(struct phy_device *phydev);
Expand Down

0 comments on commit 2e9f8ab

Please sign in to comment.