* [PATCH] [net-next] e1000e: fix unused-function warning
@ 2020-05-27 13:47 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2020-05-27 13:47 UTC (permalink / raw)
To: Jeff Kirsher, David S. Miller, Jakub Kicinski, Vitaly Lifshits
Cc: Arnd Bergmann, Sasha Neftin, Alexander Duyck, Rafael J. Wysocki,
Konstantin Khlebnikov, Detlev Casanova, intel-wired-lan, netdev,
linux-kernel
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: e086ba2fccda ("e1000e: disable s0ix entry and exit flows for ME systems")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 9cc8ec5421d5..66ca083b95f9 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6351,7 +6351,6 @@ static void e1000e_flush_lpic(struct pci_dev *pdev)
pm_runtime_put_sync(netdev->dev.parent);
}
-#ifdef CONFIG_PM_SLEEP
/* S0ix implementation */
static void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter)
{
@@ -6573,7 +6572,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)
{
@@ -6871,7 +6869,6 @@ static int e1000e_pm_thaw(struct device *dev)
return rc;
}
-#ifdef CONFIG_PM
static int __e1000_resume(struct pci_dev *pdev)
{
struct net_device *netdev = pci_get_drvdata(pdev);
@@ -6937,8 +6934,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);
@@ -6962,7 +6958,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);
@@ -6981,9 +6977,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);
@@ -6999,7 +6994,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);
@@ -7016,7 +7011,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);
@@ -7041,7 +7036,6 @@ static int e1000e_pm_runtime_suspend(struct device *dev)
return 0;
}
-#endif /* CONFIG_PM */
static void e1000_shutdown(struct pci_dev *pdev)
{
--
2.26.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Intel-wired-lan] [PATCH] [net-next] e1000e: fix unused-function warning
@ 2020-05-27 13:47 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2020-05-27 13:47 UTC (permalink / raw)
To: intel-wired-lan
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: e086ba2fccda ("e1000e: disable s0ix entry and exit flows for ME systems")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 9cc8ec5421d5..66ca083b95f9 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6351,7 +6351,6 @@ static void e1000e_flush_lpic(struct pci_dev *pdev)
pm_runtime_put_sync(netdev->dev.parent);
}
-#ifdef CONFIG_PM_SLEEP
/* S0ix implementation */
static void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter)
{
@@ -6573,7 +6572,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)
{
@@ -6871,7 +6869,6 @@ static int e1000e_pm_thaw(struct device *dev)
return rc;
}
-#ifdef CONFIG_PM
static int __e1000_resume(struct pci_dev *pdev)
{
struct net_device *netdev = pci_get_drvdata(pdev);
@@ -6937,8 +6934,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);
@@ -6962,7 +6958,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);
@@ -6981,9 +6977,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);
@@ -6999,7 +6994,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);
@@ -7016,7 +7011,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);
@@ -7041,7 +7036,6 @@ static int e1000e_pm_runtime_suspend(struct device *dev)
return 0;
}
-#endif /* CONFIG_PM */
static void e1000_shutdown(struct pci_dev *pdev)
{
--
2.26.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [Intel-wired-lan] [PATCH] [net-next] e1000e: fix unused-function warning
2020-05-27 13:47 ` [Intel-wired-lan] " Arnd Bergmann
@ 2020-06-01 17:08 ` Brown, Aaron F
-1 siblings, 0 replies; 4+ messages in thread
From: Brown, Aaron F @ 2020-06-01 17:08 UTC (permalink / raw)
To: Arnd Bergmann, Kirsher, Jeffrey T, David S. Miller,
Jakub Kicinski, Lifshits, Vitaly
Cc: Konstantin Khlebnikov, netdev, Wysocki, Rafael J, linux-kernel,
intel-wired-lan, Alexander Duyck
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Arnd
> Bergmann
> Sent: Wednesday, May 27, 2020 6:47 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; David S. Miller
> <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>; Lifshits, Vitaly
> <vitaly.lifshits@intel.com>
> Cc: Arnd Bergmann <arnd@arndb.de>; Konstantin Khlebnikov
> <khlebnikov@yandex-team.ru>; netdev@vger.kernel.org; Wysocki, Rafael J
> <rafael.j.wysocki@intel.com>; linux-kernel@vger.kernel.org; intel-wired-
> lan@lists.osuosl.org; Alexander Duyck <alexander.h.duyck@linux.intel.com>
> Subject: [Intel-wired-lan] [PATCH] [net-next] 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: e086ba2fccda ("e1000e: disable s0ix entry and exit flows for ME systems")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/net/ethernet/intel/e1000e/netdev.c | 16 +++++-----------
> 1 file changed, 5 insertions(+), 11 deletions(-)
>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Intel-wired-lan] [PATCH] [net-next] e1000e: fix unused-function warning
@ 2020-06-01 17:08 ` Brown, Aaron F
0 siblings, 0 replies; 4+ messages in thread
From: Brown, Aaron F @ 2020-06-01 17:08 UTC (permalink / raw)
To: intel-wired-lan
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Arnd
> Bergmann
> Sent: Wednesday, May 27, 2020 6:47 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; David S. Miller
> <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>; Lifshits, Vitaly
> <vitaly.lifshits@intel.com>
> Cc: Arnd Bergmann <arnd@arndb.de>; Konstantin Khlebnikov
> <khlebnikov@yandex-team.ru>; netdev at vger.kernel.org; Wysocki, Rafael J
> <rafael.j.wysocki@intel.com>; linux-kernel at vger.kernel.org; intel-wired-
> lan at lists.osuosl.org; Alexander Duyck <alexander.h.duyck@linux.intel.com>
> Subject: [Intel-wired-lan] [PATCH] [net-next] 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: e086ba2fccda ("e1000e: disable s0ix entry and exit flows for ME systems")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/net/ethernet/intel/e1000e/netdev.c | 16 +++++-----------
> 1 file changed, 5 insertions(+), 11 deletions(-)
>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-01 17:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27 13:47 [PATCH] [net-next] e1000e: fix unused-function warning Arnd Bergmann
2020-05-27 13:47 ` [Intel-wired-lan] " Arnd Bergmann
2020-06-01 17:08 ` Brown, Aaron F
2020-06-01 17:08 ` Brown, Aaron F
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.