Re: [PATCH net-next] net: phy: mdio-bcm-unimac: mark PM functions as __maybe_unused

From: David Miller
Date: Wed Sep 26 2018 - 13:36:31 EST


From: Arnd Bergmann <arnd@xxxxxxxx>
Date: Wed, 26 Sep 2018 15:14:10 +0200

> The newly added runtime-pm support causes a harmless warning
> when CONFIG_PM is disabled:
>
> drivers/net/phy/mdio-bcm-unimac.c:330:12: error: 'unimac_mdio_resume' defined but not used [-Werror=unused-function]
> static int unimac_mdio_resume(struct device *d)
> drivers/net/phy/mdio-bcm-unimac.c:321:12: error: 'unimac_mdio_suspend' defined but not used [-Werror=unused-function]
> static int unimac_mdio_suspend(struct device *d)
>
> Marking the functions as __maybe_unused is the easiest workaround
> and avoids adding #ifdef checks.
>
> Fixes: b78ac6ecd1b6 ("net: phy: mdio-bcm-unimac: Allow configuring MDIO clock divider")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Applied.