summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2021-03-17 14:52:34 +0000
committerTony Nguyen <anthony.l.nguyen@intel.com>2021-03-19 13:53:49 -0700
commitf2d75b178532087c15b2a86ec79e443177611b7a (patch)
treec8e10c6ac235928d56c33c43ca5503abc13fb40a
parent501f23092ddb2e071a3464db6744e92c22535c6e (diff)
e1000e: Mark e1000e_pm_prepare() as __maybe_unused
The function e1000e_pm_prepare() may have no callers depending on configuration, so it must be marked __maybe_unused to avoid harmless warning: drivers/net/ethernet/intel/e1000e/netdev.c:6926:12: warning: 'e1000e_pm_prepare' defined but not used [-Wunused-function] 6926 | static int e1000e_pm_prepare(struct device *dev) | ^~~~~~~~~~~~~~~~~ Fixes: ccf8b940e5fd ("e1000e: Leverage direct_complete to speed up s2ram") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
-rw-r--r--drivers/net/ethernet/intel/e1000e/netdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 480f6712a3b6..39ca02b7fdc5 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6919,7 +6919,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();