* [PATCH 1/3] ACPI: watchdog: remove unnecessary CONFIG_PM_SLEEP
@ 2020-10-29 7:53 Coiby Xu
2020-10-29 7:53 ` [PATCH 2/3] watchdog: st_lpc_wdt: " Coiby Xu
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Coiby Xu @ 2020-10-29 7:53 UTC (permalink / raw)
To: Guenter Roeck, Wim Van Sebroeck
Cc: open list:WATCHDOG DEVICE DRIVERS, open list
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS has already took good care of CONFIG_PM_CONFIG.
Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
---
drivers/watchdog/wdat_wdt.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/watchdog/wdat_wdt.c b/drivers/watchdog/wdat_wdt.c
index 3065dd670a18..0d912ceb2ecd 100644
--- a/drivers/watchdog/wdat_wdt.c
+++ b/drivers/watchdog/wdat_wdt.c
@@ -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,
--
2.28.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] watchdog: st_lpc_wdt: remove unnecessary CONFIG_PM_SLEEP
2020-10-29 7:53 [PATCH 1/3] ACPI: watchdog: remove unnecessary CONFIG_PM_SLEEP Coiby Xu
@ 2020-10-29 7:53 ` Coiby Xu
2020-10-29 7:58 ` Patrice CHOTARD
2020-10-29 13:03 ` Guenter Roeck
2020-10-29 7:53 ` [PATCH 3/3] watchdog: sirfsoc_wdt: " Coiby Xu
2020-10-29 13:02 ` [PATCH 1/3] ACPI: watchdog: " Guenter Roeck
2 siblings, 2 replies; 10+ messages in thread
From: Coiby Xu @ 2020-10-29 7:53 UTC (permalink / raw)
To: Guenter Roeck, Wim Van Sebroeck
Cc: Patrice Chotard, moderated list:ARM/STI ARCHITECTURE,
open list:WATCHDOG DEVICE DRIVERS, open list
SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.
Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
---
drivers/watchdog/st_lpc_wdt.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/watchdog/st_lpc_wdt.c b/drivers/watchdog/st_lpc_wdt.c
index 14ab6559c748..c1428d63dc9e 100644
--- a/drivers/watchdog/st_lpc_wdt.c
+++ b/drivers/watchdog/st_lpc_wdt.c
@@ -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,
--
2.28.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] watchdog: st_lpc_wdt: remove unnecessary CONFIG_PM_SLEEP
2020-10-29 7:53 ` [PATCH 2/3] watchdog: st_lpc_wdt: " Coiby Xu
@ 2020-10-29 7:58 ` Patrice CHOTARD
2020-10-29 13:13 ` Patrice CHOTARD
2020-10-29 14:51 ` Coiby Xu
2020-10-29 13:03 ` Guenter Roeck
1 sibling, 2 replies; 10+ messages in thread
From: Patrice CHOTARD @ 2020-10-29 7:58 UTC (permalink / raw)
To: Coiby Xu, Guenter Roeck, Wim Van Sebroeck
Cc: moderated list:ARM/STI ARCHITECTURE,
open list:WATCHDOG DEVICE DRIVERS, open list
Hi Coiby
On 10/29/20 8:53 AM, Coiby Xu wrote:
> SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.
>
> Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
> ---
> drivers/watchdog/st_lpc_wdt.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/watchdog/st_lpc_wdt.c b/drivers/watchdog/st_lpc_wdt.c
> index 14ab6559c748..c1428d63dc9e 100644
> --- a/drivers/watchdog/st_lpc_wdt.c
> +++ b/drivers/watchdog/st_lpc_wdt.c
> @@ -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,
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Thanks
Patrice
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] watchdog: st_lpc_wdt: remove unnecessary CONFIG_PM_SLEEP
2020-10-29 7:58 ` Patrice CHOTARD
@ 2020-10-29 13:13 ` Patrice CHOTARD
2020-10-29 14:51 ` Coiby Xu
1 sibling, 0 replies; 10+ messages in thread
From: Patrice CHOTARD @ 2020-10-29 13:13 UTC (permalink / raw)
To: Guenter Roeck, Wim Van Sebroeck
Cc: moderated list:ARM/STI ARCHITECTURE,
open list:WATCHDOG DEVICE DRIVERS, open list
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
On 10/29/20 8:58 AM, Patrice CHOTARD wrote:
> Hi Coiby
>
> On 10/29/20 8:53 AM, Coiby Xu wrote:
>> SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.
>>
>> Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
>> ---
>> drivers/watchdog/st_lpc_wdt.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/watchdog/st_lpc_wdt.c b/drivers/watchdog/st_lpc_wdt.c
>> index 14ab6559c748..c1428d63dc9e 100644
>> --- a/drivers/watchdog/st_lpc_wdt.c
>> +++ b/drivers/watchdog/st_lpc_wdt.c
>> @@ -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,
> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
>
> Thanks
>
> Patrice
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] watchdog: st_lpc_wdt: remove unnecessary CONFIG_PM_SLEEP
2020-10-29 7:58 ` Patrice CHOTARD
2020-10-29 13:13 ` Patrice CHOTARD
@ 2020-10-29 14:51 ` Coiby Xu
1 sibling, 0 replies; 10+ messages in thread
From: Coiby Xu @ 2020-10-29 14:51 UTC (permalink / raw)
To: Patrice CHOTARD
Cc: Guenter Roeck, Wim Van Sebroeck,
moderated list:ARM/STI ARCHITECTURE,
open list:WATCHDOG DEVICE DRIVERS, open list
On Thu, Oct 29, 2020 at 07:58:30AM +0000, Patrice CHOTARD wrote:
>Hi Coiby
>
>On 10/29/20 8:53 AM, Coiby Xu wrote:
>> SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.
>>
>> Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
>> ---
>> drivers/watchdog/st_lpc_wdt.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/watchdog/st_lpc_wdt.c b/drivers/watchdog/st_lpc_wdt.c
>> index 14ab6559c748..c1428d63dc9e 100644
>> --- a/drivers/watchdog/st_lpc_wdt.c
>> +++ b/drivers/watchdog/st_lpc_wdt.c
>> @@ -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,
>
>Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
>
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:)
>Thanks
>
>Patrice
--
Best regards,
Coiby
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] watchdog: st_lpc_wdt: remove unnecessary CONFIG_PM_SLEEP
2020-10-29 7:53 ` [PATCH 2/3] watchdog: st_lpc_wdt: " Coiby Xu
2020-10-29 7:58 ` Patrice CHOTARD
@ 2020-10-29 13:03 ` Guenter Roeck
1 sibling, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2020-10-29 13:03 UTC (permalink / raw)
To: Coiby Xu, Wim Van Sebroeck
Cc: Patrice Chotard, moderated list:ARM/STI ARCHITECTURE,
open list:WATCHDOG DEVICE DRIVERS, open list
On 10/29/20 12:53 AM, Coiby Xu wrote:
> SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.
> > Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
> ---
> drivers/watchdog/st_lpc_wdt.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/watchdog/st_lpc_wdt.c b/drivers/watchdog/st_lpc_wdt.c
> index 14ab6559c748..c1428d63dc9e 100644
> --- a/drivers/watchdog/st_lpc_wdt.c
> +++ b/drivers/watchdog/st_lpc_wdt.c
> @@ -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.
> {
> 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,
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 3/3] watchdog: sirfsoc_wdt: remove unnecessary CONFIG_PM_SLEEP
2020-10-29 7:53 [PATCH 1/3] ACPI: watchdog: remove unnecessary CONFIG_PM_SLEEP Coiby Xu
2020-10-29 7:53 ` [PATCH 2/3] watchdog: st_lpc_wdt: " Coiby Xu
@ 2020-10-29 7:53 ` Coiby Xu
2020-10-29 13:05 ` Guenter Roeck
2020-10-29 13:02 ` [PATCH 1/3] ACPI: watchdog: " Guenter Roeck
2 siblings, 1 reply; 10+ messages in thread
From: Coiby Xu @ 2020-10-29 7:53 UTC (permalink / raw)
To: Guenter Roeck, Wim Van Sebroeck
Cc: Barry Song, open list:WATCHDOG DEVICE DRIVERS,
moderated list:ARM/CSR SIRFPRIMA2 MACHINE SUPPORT, open list
SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.
Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
---
drivers/watchdog/sirfsoc_wdt.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/watchdog/sirfsoc_wdt.c b/drivers/watchdog/sirfsoc_wdt.c
index 734cf2966ecb..dc8341cd7d44 100644
--- a/drivers/watchdog/sirfsoc_wdt.c
+++ b/drivers/watchdog/sirfsoc_wdt.c
@@ -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);
--
2.28.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] watchdog: sirfsoc_wdt: remove unnecessary CONFIG_PM_SLEEP
2020-10-29 7:53 ` [PATCH 3/3] watchdog: sirfsoc_wdt: " Coiby Xu
@ 2020-10-29 13:05 ` Guenter Roeck
2020-10-29 14:30 ` Coiby Xu
0 siblings, 1 reply; 10+ messages in thread
From: Guenter Roeck @ 2020-10-29 13:05 UTC (permalink / raw)
To: Coiby Xu, Wim Van Sebroeck
Cc: Barry Song, open list:WATCHDOG DEVICE DRIVERS,
moderated list:ARM/CSR SIRFPRIMA2 MACHINE SUPPORT, open list
On 10/29/20 12:53 AM, Coiby Xu wrote:
> SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.
>
> Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
> ---
> drivers/watchdog/sirfsoc_wdt.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/watchdog/sirfsoc_wdt.c b/drivers/watchdog/sirfsoc_wdt.c
> index 734cf2966ecb..dc8341cd7d44 100644
> --- a/drivers/watchdog/sirfsoc_wdt.c
> +++ b/drivers/watchdog/sirfsoc_wdt.c
> @@ -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.
> {
> 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);
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] watchdog: sirfsoc_wdt: remove unnecessary CONFIG_PM_SLEEP
2020-10-29 13:05 ` Guenter Roeck
@ 2020-10-29 14:30 ` Coiby Xu
0 siblings, 0 replies; 10+ messages in thread
From: Coiby Xu @ 2020-10-29 14:30 UTC (permalink / raw)
To: Guenter Roeck
Cc: Wim Van Sebroeck, Barry Song, open list:WATCHDOG DEVICE DRIVERS,
moderated list:ARM/CSR SIRFPRIMA2 MACHINE SUPPORT, open list
On Thu, Oct 29, 2020 at 06:05:21AM -0700, Guenter Roeck wrote:
>On 10/29/20 12:53 AM, Coiby Xu wrote:
>> SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.
>>
>> Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
>> ---
>> drivers/watchdog/sirfsoc_wdt.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/watchdog/sirfsoc_wdt.c b/drivers/watchdog/sirfsoc_wdt.c
>> index 734cf2966ecb..dc8341cd7d44 100644
>> --- a/drivers/watchdog/sirfsoc_wdt.c
>> +++ b/drivers/watchdog/sirfsoc_wdt.c
>> @@ -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.
I will test it before send v2! Thank you for the feedback!
>
>> {
>> 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);
>>
>
--
Best regards,
Coiby
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/3] ACPI: watchdog: remove unnecessary CONFIG_PM_SLEEP
2020-10-29 7:53 [PATCH 1/3] ACPI: watchdog: remove unnecessary CONFIG_PM_SLEEP Coiby Xu
2020-10-29 7:53 ` [PATCH 2/3] watchdog: st_lpc_wdt: " Coiby Xu
2020-10-29 7:53 ` [PATCH 3/3] watchdog: sirfsoc_wdt: " Coiby Xu
@ 2020-10-29 13:02 ` Guenter Roeck
2 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2020-10-29 13:02 UTC (permalink / raw)
To: Coiby Xu, Wim Van Sebroeck; +Cc: open list:WATCHDOG DEVICE DRIVERS, open list
On 10/29/20 12:53 AM, Coiby Xu wrote:
> SET_NOIRQ_SYSTEM_SLEEP_PM_OPS has already took good care of CONFIG_PM_CONFIG.
>
Not really.
> Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
> ---
> drivers/watchdog/wdat_wdt.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/watchdog/wdat_wdt.c b/drivers/watchdog/wdat_wdt.c
> index 3065dd670a18..0d912ceb2ecd 100644
> --- a/drivers/watchdog/wdat_wdt.c
> +++ b/drivers/watchdog/wdat_wdt.c
> @@ -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
> {
> 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,
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-10-29 14:52 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29 7:53 [PATCH 1/3] ACPI: watchdog: remove unnecessary CONFIG_PM_SLEEP Coiby Xu
2020-10-29 7:53 ` [PATCH 2/3] watchdog: st_lpc_wdt: " Coiby Xu
2020-10-29 7:58 ` Patrice CHOTARD
2020-10-29 13:13 ` Patrice CHOTARD
2020-10-29 14:51 ` Coiby Xu
2020-10-29 13:03 ` Guenter Roeck
2020-10-29 7:53 ` [PATCH 3/3] watchdog: sirfsoc_wdt: " Coiby Xu
2020-10-29 13:05 ` Guenter Roeck
2020-10-29 14:30 ` Coiby Xu
2020-10-29 13:02 ` [PATCH 1/3] ACPI: watchdog: " Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).