e1000e: fix unused-function warning
The CONFIG_PM_SLEEP #ifdef checks in this file are inconsistent,
leading to a warning about sometimes unused function:
drivers/net/ethernet/intel/e1000e/netdev.c:137:13: error: unused function 'e1000e_check_me' [-Werror,-Wunused-function]
Rather than adding more #ifdefs, just remove them completely
and mark the PM functions as __maybe_unused to let the compiler
work it out on it own.
Fixes: e086ba2fcc
("e1000e: disable s0ix entry and exit flows for ME systems")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
eb6779d4c5
commit
880e6269fd
|
@ -6349,7 +6349,6 @@ fl_out:
|
|||
pm_runtime_put_sync(netdev->dev.parent);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
/* S0ix implementation */
|
||||
static void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter)
|
||||
{
|
||||
|
@ -6571,7 +6570,6 @@ static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter)
|
|||
mac_data &= ~E1000_CTRL_EXT_FORCE_SMBUS;
|
||||
ew32(CTRL_EXT, mac_data);
|
||||
}
|
||||
#endif /* CONFIG_PM_SLEEP */
|
||||
|
||||
static int e1000e_pm_freeze(struct device *dev)
|
||||
{
|
||||
|
@ -6875,7 +6873,6 @@ err_irq:
|
|||
return rc;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int __e1000_resume(struct pci_dev *pdev)
|
||||
{
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
|
@ -6941,8 +6938,7 @@ static int __e1000_resume(struct pci_dev *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int e1000e_pm_suspend(struct device *dev)
|
||||
static __maybe_unused int e1000e_pm_suspend(struct device *dev)
|
||||
{
|
||||
struct net_device *netdev = pci_get_drvdata(to_pci_dev(dev));
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
|
@ -6966,7 +6962,7 @@ static int e1000e_pm_suspend(struct device *dev)
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int e1000e_pm_resume(struct device *dev)
|
||||
static __maybe_unused int e1000e_pm_resume(struct device *dev)
|
||||
{
|
||||
struct net_device *netdev = pci_get_drvdata(to_pci_dev(dev));
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
|
@ -6985,9 +6981,8 @@ static int e1000e_pm_resume(struct device *dev)
|
|||
|
||||
return e1000e_pm_thaw(dev);
|
||||
}
|
||||
#endif /* CONFIG_PM_SLEEP */
|
||||
|
||||
static int e1000e_pm_runtime_idle(struct device *dev)
|
||||
static __maybe_unused int e1000e_pm_runtime_idle(struct device *dev)
|
||||
{
|
||||
struct net_device *netdev = dev_get_drvdata(dev);
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
|
@ -7003,7 +6998,7 @@ static int e1000e_pm_runtime_idle(struct device *dev)
|
|||
return -EBUSY;
|
||||
}
|
||||
|
||||
static int e1000e_pm_runtime_resume(struct device *dev)
|
||||
static __maybe_unused int e1000e_pm_runtime_resume(struct device *dev)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(dev);
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
|
@ -7020,7 +7015,7 @@ static int e1000e_pm_runtime_resume(struct device *dev)
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int e1000e_pm_runtime_suspend(struct device *dev)
|
||||
static __maybe_unused int e1000e_pm_runtime_suspend(struct device *dev)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(dev);
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
|
@ -7045,7 +7040,6 @@ static int e1000e_pm_runtime_suspend(struct device *dev)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
static void e1000_shutdown(struct pci_dev *pdev)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue