net: phy: make mdio_bus_phy_suspend/resume as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Thu, 25 Feb 2021 14:57:27 +0000 (15:57 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 26 Feb 2021 23:43:25 +0000 (15:43 -0800)
commit7f654157f0aefba04cd7f6297351c87b76b47b89
treeb14cc70ca9ec21d001fbb35c74b4b1dcffb6d932
parent63c75c053b4160f7b90a418dcc4e5bcfac2fb6fc
net: phy: make mdio_bus_phy_suspend/resume as __maybe_unused

When CONFIG_PM_SLEEP is disabled, the compiler warns about unused
functions:

drivers/net/phy/phy_device.c:273:12: error: unused function 'mdio_bus_phy_suspend' [-Werror,-Wunused-function]
static int mdio_bus_phy_suspend(struct device *dev)
drivers/net/phy/phy_device.c:293:12: error: unused function 'mdio_bus_phy_resume' [-Werror,-Wunused-function]
static int mdio_bus_phy_resume(struct device *dev)

The logic is intentional, so just mark these two as __maybe_unused
and remove the incorrect #ifdef.

Fixes: 4c0d2e96ba05 ("net: phy: consider that suspend2ram may cut off PHY power")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20210225145748.404410-1-arnd@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phy_device.c