* [PATCH -next] e1000e: Fix 'defined but not used' warning
@ 2021-03-19 7:26 Bixuan Cui
0 siblings, 0 replies; only message in thread
From: Bixuan Cui @ 2021-03-19 7:26 UTC (permalink / raw)
To: davem, jesse.brandeburg, anthony.l.nguyen, kuba
Cc: netdev, linux-kernel, linux-next, john.wanghui
Fix the warning while disable CONFIG_PM_SLEEP:
drivers/net/ethernet/intel/e1000e/netdev.c:6926:12: warning:
‘e1000e_pm_prepare’ defined but not used [-Wunused-function]
static int e1000e_pm_prepare(struct device *dev)
^~~~~~~~~~~~~~~~~
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index f1c9debd9f3b..d2e4653536c5 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6923,7 +6923,7 @@ static int __e1000_resume(struct pci_dev *pdev)
return 0;
}
-static int e1000e_pm_prepare(struct device *dev)
+static __maybe_unused int e1000e_pm_prepare(struct device *dev)
{
return pm_runtime_suspended(dev) &&
pm_suspend_via_firmware();
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-19 7:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 7:26 [PATCH -next] e1000e: Fix 'defined but not used' warning Bixuan Cui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).