Skip to content

Commit

Permalink
e1000e: Mark e1000e_pm_prepare() as __maybe_unused
Browse files Browse the repository at this point in the history
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: ccf8b94 ("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>
  • Loading branch information
Wei Yongjun authored and Tony Nguyen committed Mar 19, 2021
1 parent 501f230 commit f2d75b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/intel/e1000e/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f2d75b1

Please sign in to comment.