* [PATCH 2/3] watchdog: st_lpc_wdt: remove unnecessary CONFIG_PM_SLEEP [not found] <20201029075327.228570-1-coiby.xu@gmail.com> @ 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 1 sibling, 2 replies; 8+ messages in thread From: Coiby Xu @ 2020-10-29 7:53 UTC (permalink / raw) To: Guenter Roeck, Wim Van Sebroeck Cc: open list, Patrice Chotard, moderated list:ARM/STI ARCHITECTURE, open list:WATCHDOG DEVICE DRIVERS 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 8+ 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: remove unnecessary CONFIG_PM_SLEEP 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; 8+ messages in thread From: Patrice CHOTARD @ 2020-10-29 7:58 UTC (permalink / raw) To: Coiby Xu, Guenter Roeck, Wim Van Sebroeck Cc: open list:WATCHDOG DEVICE DRIVERS, moderated list:ARM/STI ARCHITECTURE, 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 8+ 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; 8+ messages in thread From: Patrice CHOTARD @ 2020-10-29 13:13 UTC (permalink / raw) To: Guenter Roeck, Wim Van Sebroeck Cc: open list:WATCHDOG DEVICE DRIVERS, moderated list:ARM/STI ARCHITECTURE, 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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 8+ 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; 8+ messages in thread From: Coiby Xu @ 2020-10-29 14:51 UTC (permalink / raw) To: Patrice CHOTARD Cc: open list, Wim Van Sebroeck, moderated list:ARM/STI ARCHITECTURE, Guenter Roeck, open list:WATCHDOG DEVICE DRIVERS 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 8+ 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: remove unnecessary CONFIG_PM_SLEEP Coiby Xu 2020-10-29 7:58 ` Patrice CHOTARD @ 2020-10-29 13:03 ` Guenter Roeck 1 sibling, 0 replies; 8+ messages in thread From: Guenter Roeck @ 2020-10-29 13:03 UTC (permalink / raw) To: Coiby Xu, Wim Van Sebroeck Cc: open list, Patrice Chotard, moderated list:ARM/STI ARCHITECTURE, open list:WATCHDOG DEVICE DRIVERS 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, > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/3] watchdog: sirfsoc_wdt: remove unnecessary CONFIG_PM_SLEEP [not found] <20201029075327.228570-1-coiby.xu@gmail.com> 2020-10-29 7:53 ` [PATCH 2/3] watchdog: st_lpc_wdt: remove unnecessary CONFIG_PM_SLEEP Coiby Xu @ 2020-10-29 7:53 ` Coiby Xu 2020-10-29 13:05 ` Guenter Roeck 1 sibling, 1 reply; 8+ 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 8+ 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; 8+ 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); > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 8+ 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; 8+ messages in thread From: Coiby Xu @ 2020-10-29 14:30 UTC (permalink / raw) To: Guenter Roeck Cc: Barry Song, Wim Van Sebroeck, 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-10-29 14:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20201029075327.228570-1-coiby.xu@gmail.com>
2020-10-29 7:53 ` [PATCH 2/3] watchdog: st_lpc_wdt: remove unnecessary CONFIG_PM_SLEEP 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
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).