ACPI: watchdog: remove unnecessary CONFIG_PM_SLEEP
Subsystems (2)
PATCH 1/3 ACPI: watchdog: remove unnecessary CONFIG_PM_SLEEP
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS has already took good care of CONFIG_PM_CONFIG.
--- drivers/watchdog/wdat_wdt.c | 2 -- 1 file changed, 2 deletions(-)
drivers/watchdog/wdat_wdt.c +0 -2
@@ -465,7 +465,6 @@ static int wdat_wdt_probe(struct platform_device *pdev)return devm_watchdog_register_device (dev, &wdat->wdd); } -#ifdef CONFIG_PM_SLEEP static int wdat_wdt_suspend_noirq (struct device *dev) {struct wdat_wdt *wdat =dev_get_drvdata (dev);
@@ -526,7 +525,6 @@ static int wdat_wdt_resume_noirq(struct device *dev)return wdat_wdt_start (&wdat->wdd); } -#endif static const struct dev_pm_ops wdat_wdt_pm_ops = { SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(wdat_wdt_suspend_noirq,
Signature · 1 line
2.28.0
PATCH 2/3 watchdog: st_lpc_wdt: remove unnecessary CONFIG_PM_SLEEP
SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.
--- drivers/watchdog/st_lpc_wdt.c | 2 -- 1 file changed, 2 deletions(-)
drivers/watchdog/st_lpc_wdt.c +0 -2
@@ -248,7 +248,6 @@ static int st_wdog_remove(struct platform_device *pdev)return 0 ; } -#ifdef CONFIG_PM_SLEEP static int st_wdog_suspend (struct device *dev) {struct st_wdog *st_wdog =watchdog_get_drvdata (&st_wdog_dev);
@@ -285,7 +284,6 @@ static int st_wdog_resume(struct device *dev)return 0 ; } -#endif static SIMPLE_DEV_PM_OPS(st_wdog_pm_ops, st_wdog_suspend,
Signature · 7 lines
2.28.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 2/3] watchdog: st_lpc_wdt: remove unnecessary CONFIG_PM_SLEEP
Hi Coiby
Quoted 20 lines · Coiby Xu
SIMPLE_DEV_PM_OPShas already took good care ofCONFIG_PM_CONFIG.Signed-off-by Coiby Xu <[email protected]>--- drivers/watchdog/st_lpc_wdt.c | 2 -- 1 file changed, 2 deletions(-)drivers/watchdog/st_lpc_wdt.c +0
-1@@ -248,7 +248,6 @@ static int st_wdog_remove(struct platform_device *pdev)return 0 ; } -#ifdef CONFIG_PM_SLEEP static int st_wdog_suspend (struct device *dev) {struct st_wdog *st_wdog =watchdog_get_drvdata (&st_wdog_dev);
drivers/watchdog/st_lpc_wdt.c static int st_wdog_resume(struct device *dev) · line 289
Quoted 7 lines
drivers/watchdog/st_lpc_wdt.c +0
-1@@ -285,7 +284,6 @@ static int st_wdog_resume(struct device *dev)return 0 ; } -#endif static SIMPLE_DEV_PM_OPS(st_wdog_pm_ops, st_wdog_suspend,
Thanks
Patrice
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 2/3] watchdog: st_lpc_wdt: remove unnecessary CONFIG_PM_SLEEP
Hi Coiby
As already pointed by Fabrice Gasnier for similar patch "[PATCH 10/15] iio: adc: stm32: remove unnecessary CONFIG_PM_SLEEP"
When compiling with W=1 and CONFIG_PM_SLEEP disabled, we got the following warnings:
drivers/watchdog/st_lpc_wdt.c:265:12: warning: ‘st_wdog_resume’ defined but not used [-Wunused-function] 265 | static int st_wdog_resume(struct device *dev)
| ^~~~~~~~~~~~~~drivers/watchdog/st_lpc_wdt.c:251:12: warning: ‘st_wdog_suspend’ defined but not used [-Wunused-function] 251 | static int st_wdog_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~
Can you add missing "__maybe unused" attribute ?
Thanks
Patrice
Quoted 36 lines · Patrice CHOTARD
Hi Coiby
Quoted 20 lines · Coiby Xu
SIMPLE_DEV_PM_OPShas already took good care ofCONFIG_PM_CONFIG.Signed-off-by Coiby Xu <[email protected]>--- drivers/watchdog/st_lpc_wdt.c | 2 -- 1 file changed, 2 deletions(-)drivers/watchdog/st_lpc_wdt.c +0
-1@@ -248,7 +248,6 @@ static int st_wdog_remove(struct platform_device *pdev)return 0 ; } -#ifdef CONFIG_PM_SLEEP static int st_wdog_suspend (struct device *dev) {struct st_wdog *st_wdog =watchdog_get_drvdata (&st_wdog_dev);drivers/watchdog/st_lpc_wdt.c static int st_wdog_resume(struct device *dev) · line 289
Quoted 7 lines
drivers/watchdog/st_lpc_wdt.c +0
-1@@ -285,7 +284,6 @@ static int st_wdog_resume(struct device *dev)return 0 ; } -#endif static SIMPLE_DEV_PM_OPS(st_wdog_pm_ops, st_wdog_suspend,Reviewed-by Patrice Chotard <[email protected]>Thanks
Patrice
Re: [PATCH 2/3] watchdog: st_lpc_wdt: remove unnecessary CONFIG_PM_SLEEP
In reply to Patrice CHOTARDQuoted 24 lines · Patrice CHOTARD
Hi Coiby
Quoted 21 lines · Coiby Xu
SIMPLE_DEV_PM_OPShas already took good care ofCONFIG_PM_CONFIG.Signed-off-by Coiby Xu <[email protected]>--- drivers/watchdog/st_lpc_wdt.c | 2 -- 1 file changed, 2 deletions(-)drivers/watchdog/st_lpc_wdt.c +0
-1@@ -248,7 +248,6 @@ static int st_wdog_remove(struct platform_device *pdev)return 0 ; } -#ifdef CONFIG_PM_SLEEP static int st_wdog_suspend (struct device *dev) {struct st_wdog *st_wdog =watchdog_get_drvdata (&st_wdog_dev);@@ -285,7 +284,6 @@ static int st_wdog_resume(struct device *dev)
Quoted 9 lines
drivers/watchdog/st_lpc_wdt.c static int st_wdog_resume(struct device *dev) · line 289
Quoted 6 lines
drivers/watchdog/st_lpc_wdt.c +0
-1return 0 ; } -#endif static SIMPLE_DEV_PM_OPS(st_wdog_pm_ops, st_wdog_suspend,Reviewed-by Patrice Chotard <[email protected]>
Thank you for reviewing the patch and giving the credit despite the compiling issue with CONFIG_PM_SLEEP disabled as pointed by Guenter and others:)
Quoted 3 lines
Thanks
Patrice
--
Best regards,
Coiby
Guenter Roeck
maintainerRe: [PATCH 2/3] watchdog: st_lpc_wdt: remove unnecessary CONFIG_PM_SLEEP
In reply to Coiby XuQuoted 11 lines · Coiby Xu
SIMPLE_DEV_PM_OPShas already took good care ofCONFIG_PM_CONFIG.Quoted 1 line
Signed-off-by Coiby Xu <[email protected]>--- drivers/watchdog/st_lpc_wdt.c | 2 -- 1 file changed, 2 deletions(-)drivers/watchdog/st_lpc_wdt.c +0
-0
drivers/watchdog/st_lpc_wdt.c static int st_wdog_remove(struct platform_device *pdev) · line 251
Quoted 5 lines
drivers/watchdog/st_lpc_wdt.c +0
-1@@ -248,7 +248,6 @@ static int st_wdog_remove(struct platform_device *pdev)return 0 ; } -#ifdef CONFIG_PM_SLEEP static int st_wdog_suspend (struct device *dev)
Again, this requires __maybe_unused.
Quoted 11 lines
drivers/watchdog/st_lpc_wdt.c +0
-1{struct st_wdog *st_wdog =watchdog_get_drvdata (&st_wdog_dev);@@ -285,7 +284,6 @@ static int st_wdog_resume(struct device *dev)return 0 ; } -#endif static SIMPLE_DEV_PM_OPS(st_wdog_pm_ops, st_wdog_suspend,
PATCH 3/3 watchdog: sirfsoc_wdt: remove unnecessary CONFIG_PM_SLEEP
In reply to Coiby XuSIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.
--- drivers/watchdog/sirfsoc_wdt.c | 2 -- 1 file changed, 2 deletions(-)
drivers/watchdog/sirfsoc_wdt.c +0 -2
@@ -170,7 +170,6 @@ static int sirfsoc_wdt_probe(struct platform_device *pdev)return 0 ; } -#ifdef CONFIG_PM_SLEEP static int sirfsoc_wdt_suspend (struct device *dev) {return 0 ;
@@ -189,7 +188,6 @@ static int sirfsoc_wdt_resume(struct device *dev)return 0 ; } -#endif static SIMPLE_DEV_PM_OPS(sirfsoc_wdt_pm_ops, sirfsoc_wdt_suspend, sirfsoc_wdt_resume);
Signature · 7 lines
2.28.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Guenter Roeck
maintainerRe: [PATCH 3/3] watchdog: sirfsoc_wdt: remove unnecessary CONFIG_PM_SLEEP
Quoted 12 lines · Coiby Xu
SIMPLE_DEV_PM_OPShas already took good care ofCONFIG_PM_CONFIG.Signed-off-by Coiby Xu <[email protected]>--- drivers/watchdog/sirfsoc_wdt.c | 2 -- 1 file changed, 2 deletions(-)drivers/watchdog/sirfsoc_wdt.c +0
-0
drivers/watchdog/sirfsoc_wdt.c static int sirfsoc_wdt_probe(struct platform_device *pdev) · line 173
Quoted 5 lines
drivers/watchdog/sirfsoc_wdt.c +0
-1@@ -170,7 +170,6 @@ static int sirfsoc_wdt_probe(struct platform_device *pdev)return 0 ; } -#ifdef CONFIG_PM_SLEEP static int sirfsoc_wdt_suspend (struct device *dev)
And again: __maybe_unused
I would suggest to test compile the code with CONFIG_PM_SLEEP disabled.
Quoted 11 lines
drivers/watchdog/sirfsoc_wdt.c +0
-1{return 0 ;@@ -189,7 +188,6 @@ static int sirfsoc_wdt_resume(struct device *dev)return 0 ; } -#endif static SIMPLE_DEV_PM_OPS(sirfsoc_wdt_pm_ops, sirfsoc_wdt_suspend, sirfsoc_wdt_resume);
Re: [PATCH 3/3] watchdog: sirfsoc_wdt: remove unnecessary CONFIG_PM_SLEEP
Quoted 16 lines · Guenter Roeck
Quoted 15 lines · Coiby Xu
SIMPLE_DEV_PM_OPShas already took good care ofCONFIG_PM_CONFIG.Signed-off-by Coiby Xu <[email protected]>--- drivers/watchdog/sirfsoc_wdt.c | 2 -- 1 file changed, 2 deletions(-)drivers/watchdog/sirfsoc_wdt.c +0
-0@@ -170,7 +170,6 @@ static int sirfsoc_wdt_probe(struct platform_device *pdev)return 0 ; }
Quoted 6 lines
drivers/watchdog/sirfsoc_wdt.c static int sirfsoc_wdt_probe(struct platform_device *pdev) · line 173
Quoted 2 lines
drivers/watchdog/sirfsoc_wdt.c +0
-1-#ifdef CONFIG_PM_SLEEP static int sirfsoc_wdt_suspend (struct device *dev)And again:
__maybe_unusedI would suggest to test compile the code with
CONFIG_PM_SLEEPdisabled.
I will test it before send v2! Thank you for the feedback!
Quoted 5 lines
Quoted 5 lines
drivers/watchdog/sirfsoc_wdt.c +0
-0{return 0 ;@@ -189,7 +188,6 @@ static int sirfsoc_wdt_resume(struct device *dev)
Quoted 8 lines
drivers/watchdog/sirfsoc_wdt.c static int sirfsoc_wdt_resume(struct device *dev) · line 193
Quoted 7 lines
drivers/watchdog/sirfsoc_wdt.c +0
-1return 0 ; } -#endif static SIMPLE_DEV_PM_OPS(sirfsoc_wdt_pm_ops, sirfsoc_wdt_suspend, sirfsoc_wdt_resume);
--
Best regards,
Coiby
Guenter Roeck
maintainerQuoted 2 lines · Coiby Xu
SET_NOIRQ_SYSTEM_SLEEP_PM_OPShas already took good care ofCONFIG_PM_CONFIG.
Not really.
Quoted 10 lines
Signed-off-by Coiby Xu <[email protected]>--- drivers/watchdog/wdat_wdt.c | 2 -- 1 file changed, 2 deletions(-)drivers/watchdog/wdat_wdt.c +0
-0
drivers/watchdog/wdat_wdt.c static int wdat_wdt_probe(struct platform_device *pdev) · line 468
Quoted 5 lines
drivers/watchdog/wdat_wdt.c +0
-1@@ -465,7 +465,6 @@ static int wdat_wdt_probe(struct platform_device *pdev)return devm_watchdog_register_device (dev, &wdat->wdd); } -#ifdef CONFIG_PM_SLEEP static int wdat_wdt_suspend_noirq (struct device *dev)
You would have to add __maybe_unused here for this to work as intended.
Guenter
Quoted 11 lines
drivers/watchdog/wdat_wdt.c +0
-1{struct wdat_wdt *wdat =dev_get_drvdata (dev);@@ -526,7 +525,6 @@ static int wdat_wdt_resume_noirq(struct device *dev)return wdat_wdt_start (&wdat->wdd); } -#endif static const struct dev_pm_ops wdat_wdt_pm_ops = { SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(wdat_wdt_suspend_noirq,