]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: mark PM functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Mon, 13 Aug 2018 21:50:41 +0000 (23:50 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Aug 2018 03:45:49 +0000 (20:45 -0700)
commitf1fa31454e4303792a210a590c49ed62a4f7ea53
tree8119782d810f7775a1f79ddab15db5711dbb48c6
parent261ec0e6e5aa9cc7cecb2695e8d853785ea0bea9
net: stmmac: mark PM functions as __maybe_unused

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: a48a5f58a8c9 ("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>
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c