]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Sep 2021 12:07:07 +0000 (14:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Sep 2021 12:07:07 +0000 (14:07 +0200)
added patches:
net-stmmac-platform-fix-build-warning-when-with-config_pm_sleep.patch

queue-5.14/net-stmmac-platform-fix-build-warning-when-with-config_pm_sleep.patch [new file with mode: 0644]
queue-5.14/series

diff --git a/queue-5.14/net-stmmac-platform-fix-build-warning-when-with-config_pm_sleep.patch b/queue-5.14/net-stmmac-platform-fix-build-warning-when-with-config_pm_sleep.patch
new file mode 100644 (file)
index 0000000..d0c3289
--- /dev/null
@@ -0,0 +1,49 @@
+From 2a48d96fd58a666ae231c3dd6fe4a458798ac645 Mon Sep 17 00:00:00 2001
+From: Joakim Zhang <qiangqing.zhang@nxp.com>
+Date: Thu, 9 Sep 2021 17:23:22 +0800
+Subject: net: stmmac: platform: fix build warning when with !CONFIG_PM_SLEEP
+
+From: Joakim Zhang <qiangqing.zhang@nxp.com>
+
+commit 2a48d96fd58a666ae231c3dd6fe4a458798ac645 upstream.
+
+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>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- 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
+       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(st
+       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);
index 963a96379099c5e0ee0e541d879a1521a0ebeb2b..367fc95f66357fa700c1f55efa3299ee069d2435 100644 (file)
@@ -78,3 +78,4 @@ net-hns3-pad-the-short-tunnel-frame-before-sending-to-hardware.patch
 net-hns3-change-affinity_mask-to-numa-node-range.patch
 net-hns3-disable-mac-in-flr-process.patch
 net-hns3-fix-the-timing-issue-of-vf-clearing-interrupt-sources.patch
+net-stmmac-platform-fix-build-warning-when-with-config_pm_sleep.patch