diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-08-13 23:50:41 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-08-13 20:45:49 -0700 |
commit | 81a8b0799632627b587af31ecd06112397e4ec36 (patch) | |
tree | 8119782d810f7775a1f79ddab15db5711dbb48c6 /drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | |
parent | c2ebc25674e5123d134e81758828084f1cc58cc3 (diff) | |
download | linux-81a8b0799632627b587af31ecd06112397e4ec36.tar.gz linux-81a8b0799632627b587af31ecd06112397e4ec36.tar.bz2 linux-81a8b0799632627b587af31ecd06112397e4ec36.zip |
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: 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>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c index 6a393b16a1fc..c54a50dbd5ac 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c @@ -303,7 +303,7 @@ static void stmmac_pci_remove(struct pci_dev *pdev) pci_disable_device(pdev); } -static int stmmac_pci_suspend(struct device *dev) +static int __maybe_unused stmmac_pci_suspend(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); int ret; @@ -321,7 +321,7 @@ static int stmmac_pci_suspend(struct device *dev) return 0; } -static int stmmac_pci_resume(struct device *dev) +static int __maybe_unused stmmac_pci_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); int ret; |