All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: stmmac: platform: fix build warning when with !CONFIG_PM_SLEEP
@ 2021-09-09  9:23 Joakim Zhang
  2021-09-09 10:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Joakim Zhang @ 2021-09-09  9:23 UTC (permalink / raw)
  To: peppe.cavallaro, alexandre.torgue, joabreu, davem; +Cc: netdev, linux-kernel

Use __maybe_unused for noirq_suspend()/noirq_resume() hooks to avoid
build warning with !CONFIG_PM_SLEEP:

>> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:796:12: error: 'stmmac_pltfr_noirq_resume' defined but not used [-Werror=unused-function]
     796 | static int stmmac_pltfr_noirq_resume(struct device *dev)
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:775:12: error: 'stmmac_pltfr_noirq_suspend' defined but not used [-Werror=unused-function]
     775 | static int stmmac_pltfr_noirq_suspend(struct device *dev)
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors

Fixes: 276aae377206 ("net: stmmac: fix system hang caused by eee_ctrl_timer during suspend/resume")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 4885f9ad1b1e..62cec9bfcd33 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -772,7 +772,7 @@ static int __maybe_unused stmmac_runtime_resume(struct device *dev)
 	return stmmac_bus_clks_config(priv, true);
 }
 
-static int stmmac_pltfr_noirq_suspend(struct device *dev)
+static int __maybe_unused stmmac_pltfr_noirq_suspend(struct device *dev)
 {
 	struct net_device *ndev = dev_get_drvdata(dev);
 	struct stmmac_priv *priv = netdev_priv(ndev);
@@ -793,7 +793,7 @@ static int stmmac_pltfr_noirq_suspend(struct device *dev)
 	return 0;
 }
 
-static int stmmac_pltfr_noirq_resume(struct device *dev)
+static int __maybe_unused stmmac_pltfr_noirq_resume(struct device *dev)
 {
 	struct net_device *ndev = dev_get_drvdata(dev);
 	struct stmmac_priv *priv = netdev_priv(ndev);
-- 
2.17.1


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

* Re: [PATCH net] net: stmmac: platform: fix build warning when with !CONFIG_PM_SLEEP
  2021-09-09  9:23 [PATCH net] net: stmmac: platform: fix build warning when with !CONFIG_PM_SLEEP Joakim Zhang
@ 2021-09-09 10:20 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-09-09 10:20 UTC (permalink / raw)
  To: Joakim Zhang
  Cc: peppe.cavallaro, alexandre.torgue, joabreu, davem, netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Thu,  9 Sep 2021 17:23:22 +0800 you wrote:
> Use __maybe_unused for noirq_suspend()/noirq_resume() hooks to avoid
> build warning with !CONFIG_PM_SLEEP:
> 
> >> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:796:12: error: 'stmmac_pltfr_noirq_resume' defined but not used [-Werror=unused-function]
>      796 | static int stmmac_pltfr_noirq_resume(struct device *dev)
>          |            ^~~~~~~~~~~~~~~~~~~~~~~~~
> >> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:775:12: error: 'stmmac_pltfr_noirq_suspend' defined but not used [-Werror=unused-function]
>      775 | static int stmmac_pltfr_noirq_suspend(struct device *dev)
>          |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
>    cc1: all warnings being treated as errors
> 
> [...]

Here is the summary with links:
  - [net] net: stmmac: platform: fix build warning when with !CONFIG_PM_SLEEP
    https://git.kernel.org/netdev/net/c/2a48d96fd58a

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-09-09 10:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09  9:23 [PATCH net] net: stmmac: platform: fix build warning when with !CONFIG_PM_SLEEP Joakim Zhang
2021-09-09 10:20 ` patchwork-bot+netdevbpf

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.