]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: mdio-bcm-unimac: mark PM functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Wed, 26 Sep 2018 13:14:10 +0000 (15:14 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Sep 2018 17:25:11 +0000 (10:25 -0700)
commitd563068f847a58b126fa597d0dbb07dfce772bd6
tree6ff057b4f8c45667e453bd2a629c6a460eabd2a5
parentf5d7a929016d9938fc675e7707d578474c11bbab
net: phy: mdio-bcm-unimac: mark PM functions as __maybe_unused

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: a7f6c5cb7c34 ("net: phy: mdio-bcm-unimac: Allow configuring MDIO clock divider")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio-bcm-unimac.c