net: stmmac: mark PM functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Mon, 13 Aug 2018 21:50:41 +0000 (23:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Nov 2018 13:52:45 +0000 (14:52 +0100)
commitcbc38304947ea2e57440bb38b733613e3f003605
tree68347a1a5dd87bdbcc5480f0aed049bf3f414290
parent726f05951941cc88e91b25b98921182cfc8d45f7
net: stmmac: mark PM functions as __maybe_unused

[ Upstream commit 81a8b0799632627b587af31ecd06112397e4ec36 ]

The newly added suspend/resume functions cause a build warning
when CONFIG_PM is disabled:

drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:324:12: error: 'stmmac_pci_resume' defined but not used [-Werror=unused-function]
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:306:12: error: 'stmmac_pci_suspend' defined but not used [-Werror=unused-function]

Mark them as __maybe_unused so gcc can drop them silently.

Fixes: b7d0f08e9129 ("net: stmmac: Fix WoL for PCI-based setups")
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>
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c