Skip to contentSkip to conversation

amd-xgbe: Fix unused suspend handlers build warning

PATCH Applied Borislav Petkov 2 participants 2 messages Nov 26, 2016 – Nov 28, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 amd-xgbe: Fix unused suspend handlers build warning

From: Borislav Petkov <[email protected]>

Fix:

drivers/net/ethernet/amd/xgbe/xgbe-main.c:835:12: warning: ‘xgbe_suspend’ defined
but not used [-Wunused-function]
drivers/net/ethernet/amd/xgbe/xgbe-main.c:855:12: warning: ‘xgbe_resume’ defined
but not used [-Wunused-function]

I see it during randconfig builds here.

---
 drivers/net/ethernet/amd/xgbe/xgbe-main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/amd/xgbe/xgbe-main.c +2 -2
index e10e569c0d5f..2e8451b0a74a 100644
@@ -831,7 +831,7 @@ static int xgbe_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int xgbe_suspend(struct device *dev)
 {
 	struct net_device *netdev = dev_get_drvdata(dev);
@@ -876,7 +876,7 @@ static int xgbe_resume(struct device *dev)
 
 	return ret;
 }
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM_SLEEP */
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id xgbe_acpi_match[] = {
Signature · 1 line
2.10.0
maintainer Applied
#1 lore raw

From: Borislav Petkov <[email protected]>
Date: Sat, 26 Nov 2016 21:53:52 +0100

Quoted 4 lines

From: Borislav Petkov <[email protected]>

Fix:

Quoted 8 lines

drivers/net/ethernet/amd/xgbe/xgbe-main.c:835:12: warning: ‘xgbe_suspend’ defined
but not used [-Wunused-function]
drivers/net/ethernet/amd/xgbe/xgbe-main.c:855:12: warning: ‘xgbe_resume’ defined
but not used [-Wunused-function]

I see it during randconfig builds here.

Applied, thanks.