linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] amd8111e: Mark PM functions as __maybe_unused
@ 2020-06-30 21:00 Nathan Chancellor
  2020-06-30 21:00 ` [PATCH net-next 2/2] pcnet32: " Nathan Chancellor
  2020-07-01  1:18 ` [PATCH net-next 1/2] amd8111e: " David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Nathan Chancellor @ 2020-06-30 21:00 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski
  Cc: Vaibhav Gupta, Don Fry, netdev, linux-kernel, Nathan Chancellor

In certain configurations without power management support, the
following warnings happen:

../drivers/net/ethernet/amd/amd8111e.c:1623:12: warning:
'amd8111e_resume' defined but not used [-Wunused-function]
 1623 | static int amd8111e_resume(struct device *dev_d)
      |            ^~~~~~~~~~~~~~~
../drivers/net/ethernet/amd/amd8111e.c:1584:12: warning:
'amd8111e_suspend' defined but not used [-Wunused-function]
 1584 | static int amd8111e_suspend(struct device *dev_d)
      |            ^~~~~~~~~~~~~~~~

Mark these functions as __maybe_unused to make it clear to the compiler
that this is going to happen based on the configuration, which is the
standard for these types of functions.

Fixes: 2caf751fe080 ("amd8111e: Convert to generic power management")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 drivers/net/ethernet/amd/amd8111e.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/amd/amd8111e.c b/drivers/net/ethernet/amd/amd8111e.c
index c6591b33abcc..5d389a984394 100644
--- a/drivers/net/ethernet/amd/amd8111e.c
+++ b/drivers/net/ethernet/amd/amd8111e.c
@@ -1581,7 +1581,7 @@ static void amd8111e_tx_timeout(struct net_device *dev, unsigned int txqueue)
 		netif_wake_queue(dev);
 }
 
-static int amd8111e_suspend(struct device *dev_d)
+static int __maybe_unused amd8111e_suspend(struct device *dev_d)
 {
 	struct net_device *dev = dev_get_drvdata(dev_d);
 	struct amd8111e_priv *lp = netdev_priv(dev);
@@ -1620,7 +1620,7 @@ static int amd8111e_suspend(struct device *dev_d)
 	return 0;
 }
 
-static int amd8111e_resume(struct device *dev_d)
+static int __maybe_unused amd8111e_resume(struct device *dev_d)
 {
 	struct net_device *dev = dev_get_drvdata(dev_d);
 	struct amd8111e_priv *lp = netdev_priv(dev);

base-commit: ff91e9292fc5aafd9ee1dc44c03cff69a3b0f39f
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH net-next 2/2] pcnet32: Mark PM functions as __maybe_unused
  2020-06-30 21:00 [PATCH net-next 1/2] amd8111e: Mark PM functions as __maybe_unused Nathan Chancellor
@ 2020-06-30 21:00 ` Nathan Chancellor
  2020-07-01  1:18   ` David Miller
  2020-07-01  1:18 ` [PATCH net-next 1/2] amd8111e: " David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Nathan Chancellor @ 2020-06-30 21:00 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski
  Cc: Vaibhav Gupta, Don Fry, netdev, linux-kernel, Nathan Chancellor

In certain configurations without power management support, the
following warnings happen:

../drivers/net/ethernet/amd/pcnet32.c:2928:12: warning:
'pcnet32_pm_resume' defined but not used [-Wunused-function]
 2928 | static int pcnet32_pm_resume(struct device *device_d)
      |            ^~~~~~~~~~~~~~~~~
../drivers/net/ethernet/amd/pcnet32.c:2916:12: warning:
'pcnet32_pm_suspend' defined but not used [-Wunused-function]
 2916 | static int pcnet32_pm_suspend(struct device *device_d)
      |            ^~~~~~~~~~~~~~~~~~

Mark these functions as __maybe_unused to make it clear to the compiler
that this is going to happen based on the configuration, which is the
standard for these types of functions.

Fixes: a86688fbef1b ("pcnet32: Convert to generic power management")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 drivers/net/ethernet/amd/pcnet32.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
index d32f54d760e7..f47140391f67 100644
--- a/drivers/net/ethernet/amd/pcnet32.c
+++ b/drivers/net/ethernet/amd/pcnet32.c
@@ -2913,7 +2913,7 @@ static void pcnet32_watchdog(struct timer_list *t)
 	mod_timer(&lp->watchdog_timer, round_jiffies(PCNET32_WATCHDOG_TIMEOUT));
 }
 
-static int pcnet32_pm_suspend(struct device *device_d)
+static int __maybe_unused pcnet32_pm_suspend(struct device *device_d)
 {
 	struct net_device *dev = dev_get_drvdata(device_d);
 
@@ -2925,7 +2925,7 @@ static int pcnet32_pm_suspend(struct device *device_d)
 	return 0;
 }
 
-static int pcnet32_pm_resume(struct device *device_d)
+static int __maybe_unused pcnet32_pm_resume(struct device *device_d)
 {
 	struct net_device *dev = dev_get_drvdata(device_d);
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next 1/2] amd8111e: Mark PM functions as __maybe_unused
  2020-06-30 21:00 [PATCH net-next 1/2] amd8111e: Mark PM functions as __maybe_unused Nathan Chancellor
  2020-06-30 21:00 ` [PATCH net-next 2/2] pcnet32: " Nathan Chancellor
@ 2020-07-01  1:18 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2020-07-01  1:18 UTC (permalink / raw)
  To: natechancellor; +Cc: kuba, vaibhavgupta40, pcnet32, netdev, linux-kernel

From: Nathan Chancellor <natechancellor@gmail.com>
Date: Tue, 30 Jun 2020 14:00:33 -0700

> In certain configurations without power management support, the
> following warnings happen:
> 
> ../drivers/net/ethernet/amd/amd8111e.c:1623:12: warning:
> 'amd8111e_resume' defined but not used [-Wunused-function]
>  1623 | static int amd8111e_resume(struct device *dev_d)
>       |            ^~~~~~~~~~~~~~~
> ../drivers/net/ethernet/amd/amd8111e.c:1584:12: warning:
> 'amd8111e_suspend' defined but not used [-Wunused-function]
>  1584 | static int amd8111e_suspend(struct device *dev_d)
>       |            ^~~~~~~~~~~~~~~~
> 
> Mark these functions as __maybe_unused to make it clear to the compiler
> that this is going to happen based on the configuration, which is the
> standard for these types of functions.
> 
> Fixes: 2caf751fe080 ("amd8111e: Convert to generic power management")
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next 2/2] pcnet32: Mark PM functions as __maybe_unused
  2020-06-30 21:00 ` [PATCH net-next 2/2] pcnet32: " Nathan Chancellor
@ 2020-07-01  1:18   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2020-07-01  1:18 UTC (permalink / raw)
  To: natechancellor; +Cc: kuba, vaibhavgupta40, pcnet32, netdev, linux-kernel

From: Nathan Chancellor <natechancellor@gmail.com>
Date: Tue, 30 Jun 2020 14:00:34 -0700

> In certain configurations without power management support, the
> following warnings happen:
> 
> ../drivers/net/ethernet/amd/pcnet32.c:2928:12: warning:
> 'pcnet32_pm_resume' defined but not used [-Wunused-function]
>  2928 | static int pcnet32_pm_resume(struct device *device_d)
>       |            ^~~~~~~~~~~~~~~~~
> ../drivers/net/ethernet/amd/pcnet32.c:2916:12: warning:
> 'pcnet32_pm_suspend' defined but not used [-Wunused-function]
>  2916 | static int pcnet32_pm_suspend(struct device *device_d)
>       |            ^~~~~~~~~~~~~~~~~~
> 
> Mark these functions as __maybe_unused to make it clear to the compiler
> that this is going to happen based on the configuration, which is the
> standard for these types of functions.
> 
> Fixes: a86688fbef1b ("pcnet32: Convert to generic power management")
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-01  1:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-30 21:00 [PATCH net-next 1/2] amd8111e: Mark PM functions as __maybe_unused Nathan Chancellor
2020-06-30 21:00 ` [PATCH net-next 2/2] pcnet32: " Nathan Chancellor
2020-07-01  1:18   ` David Miller
2020-07-01  1:18 ` [PATCH net-next 1/2] amd8111e: " David Miller

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).