]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 26 Nov 2019 12:16:56 +0000 (13:16 +0100)
commit5533121106920859cfcc1269c924e420bffc96e3
treeff876f8a9670c7c46655e6a57a9a10bd18b70650
parent6b0befa6cd5fe61ec1db57475b85963a384dfbbf
net: phy: mdio-bcm-unimac: mark PM functions as __maybe_unused

BugLink: https://bugs.launchpad.net/bugs/1853915
[ Upstream commit 9b97123a584f60a5bca5a2663485768a1f6cd0a4 ]

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@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/phy/mdio-bcm-unimac.c