From f570d849b6e81daad70701a860658b848e2cf76e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 29 Nov 2021 14:37:57 +0100 Subject: [PATCH] 5.10-stable patches added patches: net-stmmac-platform-fix-build-warning-when-with-config_pm_sleep.patch --- ...ld-warning-when-with-config_pm_sleep.patch | 49 +++++++++++++++++++ queue-5.10/series | 1 + 2 files changed, 50 insertions(+) create mode 100644 queue-5.10/net-stmmac-platform-fix-build-warning-when-with-config_pm_sleep.patch diff --git a/queue-5.10/net-stmmac-platform-fix-build-warning-when-with-config_pm_sleep.patch b/queue-5.10/net-stmmac-platform-fix-build-warning-when-with-config_pm_sleep.patch new file mode 100644 index 00000000000..93c413be10a --- /dev/null +++ b/queue-5.10/net-stmmac-platform-fix-build-warning-when-with-config_pm_sleep.patch @@ -0,0 +1,49 @@ +From 2a48d96fd58a666ae231c3dd6fe4a458798ac645 Mon Sep 17 00:00:00 2001 +From: Joakim Zhang +Date: Thu, 9 Sep 2021 17:23:22 +0800 +Subject: net: stmmac: platform: fix build warning when with !CONFIG_PM_SLEEP + +From: Joakim Zhang + +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 +Signed-off-by: Joakim Zhang +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -779,7 +779,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); +@@ -800,7 +800,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); diff --git a/queue-5.10/series b/queue-5.10/series index be411876e5b..68b0f0a40ee 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -117,3 +117,4 @@ xen-netfront-don-t-trust-the-backend-response-data-blindly.patch tty-hvc-replace-bug_on-with-negative-return-value.patch s390-mm-validate-vma-in-pgste-manipulation-functions.patch shm-extend-forced-shm-destroy-to-support-objects-from-several-ipc-nses.patch +net-stmmac-platform-fix-build-warning-when-with-config_pm_sleep.patch -- 2.47.2