net: ethernet: ti: am65-cpsw: fix CONFIG_PM #ifdef
Subsystems (2)
PATCH 1/1 net: ethernet: ti: am65-cpsw: fix CONFIG_PM #ifdef
From: Arnd Bergmann <[email protected]>
The #ifdef check is incorrect and leads to a warning:
drivers/net/ethernet/ti/am65-cpsw-nuss.c:1679:13: error: 'am65_cpsw_nuss_remove_rx_chns' defined but not used [-Werror=unused-function]
1679 | static void am65_cpsw_nuss_remove_rx_chns(void *data)
It's better to remove the #ifdef here and use the modern SYSTEM_SLEEP_PM_OPS() macro instead.
--- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/ti/am65-cpsw-nuss.c +1 -3
@@ -2878,7 +2878,6 @@ static int am65_cpsw_nuss_remove(struct platform_device *pdev)return 0 ; } -#ifdef CONFIG_PM_SLEEP static int am65_cpsw_nuss_suspend (struct device *dev) {struct am65_cpsw_common *common =dev_get_drvdata (dev);
@@ -2964,10 +2963,9 @@ static int am65_cpsw_nuss_resume(struct device *dev)return 0 ; } -#endif /* CONFIG_PM_SLEEP */ static const struct dev_pm_ops am65_cpsw_nuss_dev_pm_ops = { -SET_SYSTEM_SLEEP_PM_OPS (am65_cpsw_nuss_suspend, am65_cpsw_nuss_resume) +SYSTEM_SLEEP_PM_OPS (am65_cpsw_nuss_suspend, am65_cpsw_nuss_resume) };static struct platform_driver am65_cpsw_nuss_driver = {
Signature · 1 line
2.35.1
Quoted 30 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The #ifdef check is incorrect and leads to a warning:
drivers/net/ethernet/ti/am65-cpsw-nuss.c:1679:13: error: 'am65_cpsw_nuss_remove_rx_chns' defined but not used [-Werror=unused-function]
1679 | static voidam65_cpsw_nuss_remove_rx_chns(void *data)It's better to remove the #ifdef here and use the modern
SYSTEM_SLEEP_PM_OPS()macro instead.Fixes 24bc19b05f1f ("net: ethernet: ti: am65-cpsw: Add suspend/resume support")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/net/ethernet/ti/am65-cpsw-nuss.c +0
-1@@ -2878,7 +2878,6 @@ static int am65_cpsw_nuss_remove(struct platform_device *pdev)return 0 ; } -#ifdef CONFIG_PM_SLEEP static int am65_cpsw_nuss_suspend (struct device *dev) {struct am65_cpsw_common *common =dev_get_drvdata (dev);@@ -2964,10 +2963,9 @@ static int am65_cpsw_nuss_resume(struct device *dev)
drivers/net/ethernet/ti/am65-cpsw-nuss.c static int am65_cpsw_nuss_resume(struct device *dev) · line 2971
Quoted 10 lines
drivers/net/ethernet/ti/am65-cpsw-nuss.c +1
-2return 0 ; } -#endif /* CONFIG_PM_SLEEP */ static const struct dev_pm_ops am65_cpsw_nuss_dev_pm_ops = { -SET_SYSTEM_SLEEP_PM_OPS (am65_cpsw_nuss_suspend, am65_cpsw_nuss_resume) +SYSTEM_SLEEP_PM_OPS (am65_cpsw_nuss_suspend, am65_cpsw_nuss_resume) };static struct platform_driver am65_cpsw_nuss_driver = {
Looks good to me.
This patch was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Thu, 15 Dec 2022 17:39:05 +0100 you wrote:
From: Arnd Bergmann <[email protected]>
The #ifdef check is incorrect and leads to a warning:
drivers/net/ethernet/ti/am65-cpsw-nuss.c:1679:13: error: 'am65_cpsw_nuss_remove_rx_chns' defined but not used [-Werror=unused-function]
1679 | static voidam65_cpsw_nuss_remove_rx_chns(void *data)[...]
Here is the summary with links:
- net: ethernet: ti: am65-cpsw: fix CONFIG_PM #ifdef
https://git.kernel.org/netdev/net/c/078838f5b9c9
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html