* [PATCH] thermal: ti-soc-thermal: fix compilation warnings when !CONFIG_PM_SLEEP
@ 2015-02-07 0:17 Paul Walmsley
2015-02-09 15:00 ` Nishanth Menon
0 siblings, 1 reply; 3+ messages in thread
From: Paul Walmsley @ 2015-02-07 0:17 UTC (permalink / raw)
To: Eduardo Valentin, Zhang Rui; +Cc: linux-pm, linux-omap, linux-kernel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1887 bytes --]
When CONFIG_PM_SLEEP=n, the following compilation warnings appear:
drivers/thermal/ti-soc-thermal/ti-bandgap.c:1478:12: warning: ‘ti_bandgap_suspend’ defined but not used [-Wunused-function]
static int ti_bandgap_suspend(struct device *dev)
^
drivers/thermal/ti-soc-thermal/ti-bandgap.c:1492:12: warning: ‘ti_bandgap_resume’ defined but not used [-Wunused-function]
static int ti_bandgap_resume(struct device *dev)
A few years ago, suspend/resume-related code was protected by CONFIG_PM.
But that was changed and now it's protected by CONFIG_PM_SLEEP. Fix the
warnings by converting the preprocessor test in the TI bandgap thermal
sensor driver from testing CONFIG_PM to testing CONFIG_PM_SLEEP.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
Non-critical. Targeted for either v3.20-rc1 or v3.21-rc1.
Basic test reports for a series that includes this patch (and a few other
unrelated warning cleanups) is available here:
http://www.pwsan.com/omap/testlogs/fix-omap-warnings-v3.21/20150206154619/
Compare to:
http://www.pwsan.com/omap/testlogs/test_v3.19-rc7/20150204213018/
drivers/thermal/ti-soc-thermal/ti-bandgap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
index 634b6ce0e63a..62a5d449c388 100644
--- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
+++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
@@ -1402,7 +1402,7 @@ int ti_bandgap_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int ti_bandgap_save_ctxt(struct ti_bandgap *bgp)
{
int i;
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] thermal: ti-soc-thermal: fix compilation warnings when !CONFIG_PM_SLEEP
2015-02-07 0:17 [PATCH] thermal: ti-soc-thermal: fix compilation warnings when !CONFIG_PM_SLEEP Paul Walmsley
@ 2015-02-09 15:00 ` Nishanth Menon
2015-02-09 15:53 ` Paul Walmsley
0 siblings, 1 reply; 3+ messages in thread
From: Nishanth Menon @ 2015-02-09 15:00 UTC (permalink / raw)
To: Paul Walmsley
Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-omap, linux-kernel,
Grygorii.Strashko
On 00:17-20150207, Paul Walmsley wrote:
>
> When CONFIG_PM_SLEEP=n, the following compilation warnings appear:
>
> drivers/thermal/ti-soc-thermal/ti-bandgap.c:1478:12: warning: ‘ti_bandgap_suspend’ defined but not used [-Wunused-function]
> static int ti_bandgap_suspend(struct device *dev)
> ^
> drivers/thermal/ti-soc-thermal/ti-bandgap.c:1492:12: warning: ‘ti_bandgap_resume’ defined but not used [-Wunused-function]
> static int ti_bandgap_resume(struct device *dev)
>
> A few years ago, suspend/resume-related code was protected by CONFIG_PM.
> But that was changed and now it's protected by CONFIG_PM_SLEEP. Fix the
> warnings by converting the preprocessor test in the TI bandgap thermal
> sensor driver from testing CONFIG_PM to testing CONFIG_PM_SLEEP.
>
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> Cc: Eduardo Valentin <edubezval@gmail.com>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-omap@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
>
> Non-critical. Targeted for either v3.20-rc1 or v3.21-rc1.
>
> Basic test reports for a series that includes this patch (and a few other
> unrelated warning cleanups) is available here:
>
> http://www.pwsan.com/omap/testlogs/fix-omap-warnings-v3.21/20150206154619/
>
> Compare to:
>
> http://www.pwsan.com/omap/testlogs/test_v3.19-rc7/20150204213018/
>
> drivers/thermal/ti-soc-thermal/ti-bandgap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
> index 634b6ce0e63a..62a5d449c388 100644
> --- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
> +++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
> @@ -1402,7 +1402,7 @@ int ti_bandgap_remove(struct platform_device *pdev)
> return 0;
> }
>
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_PM_SLEEP
> static int ti_bandgap_save_ctxt(struct ti_bandgap *bgp)
> {
> int i;
> --
> 2.1.4
I am a little confused:
https://patchwork.kernel.org/patch/5792411/ was already posted. would
you suggest improvements?
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] thermal: ti-soc-thermal: fix compilation warnings when !CONFIG_PM_SLEEP
2015-02-09 15:00 ` Nishanth Menon
@ 2015-02-09 15:53 ` Paul Walmsley
0 siblings, 0 replies; 3+ messages in thread
From: Paul Walmsley @ 2015-02-09 15:53 UTC (permalink / raw)
To: Nishanth Menon
Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-omap, linux-kernel,
Grygorii.Strashko
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2421 bytes --]
On Mon, 9 Feb 2015, Nishanth Menon wrote:
> On 00:17-20150207, Paul Walmsley wrote:
> >
> > When CONFIG_PM_SLEEP=n, the following compilation warnings appear:
> >
> > drivers/thermal/ti-soc-thermal/ti-bandgap.c:1478:12: warning: ‘ti_bandgap_suspend’ defined but not used [-Wunused-function]
> > static int ti_bandgap_suspend(struct device *dev)
> > ^
> > drivers/thermal/ti-soc-thermal/ti-bandgap.c:1492:12: warning: ‘ti_bandgap_resume’ defined but not used [-Wunused-function]
> > static int ti_bandgap_resume(struct device *dev)
> >
> > A few years ago, suspend/resume-related code was protected by CONFIG_PM.
> > But that was changed and now it's protected by CONFIG_PM_SLEEP. Fix the
> > warnings by converting the preprocessor test in the TI bandgap thermal
> > sensor driver from testing CONFIG_PM to testing CONFIG_PM_SLEEP.
> >
> > Signed-off-by: Paul Walmsley <paul@pwsan.com>
> > Cc: Eduardo Valentin <edubezval@gmail.com>
> > Cc: Zhang Rui <rui.zhang@intel.com>
> > Cc: linux-pm@vger.kernel.org
> > Cc: linux-omap@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
> > ---
> >
> > Non-critical. Targeted for either v3.20-rc1 or v3.21-rc1.
> >
> > Basic test reports for a series that includes this patch (and a few other
> > unrelated warning cleanups) is available here:
> >
> > http://www.pwsan.com/omap/testlogs/fix-omap-warnings-v3.21/20150206154619/
> >
> > Compare to:
> >
> > http://www.pwsan.com/omap/testlogs/test_v3.19-rc7/20150204213018/
> >
> > drivers/thermal/ti-soc-thermal/ti-bandgap.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
> > index 634b6ce0e63a..62a5d449c388 100644
> > --- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
> > +++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
> > @@ -1402,7 +1402,7 @@ int ti_bandgap_remove(struct platform_device *pdev)
> > return 0;
> > }
> >
> > -#ifdef CONFIG_PM
> > +#ifdef CONFIG_PM_SLEEP
> > static int ti_bandgap_save_ctxt(struct ti_bandgap *bgp)
> > {
> > int i;
> > --
> > 2.1.4
>
>
> I am a little confused:
> https://patchwork.kernel.org/patch/5792411/ was already posted. would
> you suggest improvements?
Oh, nothing to be confused by, I just missed the earlier patch. I
withdraw mine.
- Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-09 15:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-07 0:17 [PATCH] thermal: ti-soc-thermal: fix compilation warnings when !CONFIG_PM_SLEEP Paul Walmsley
2015-02-09 15:00 ` Nishanth Menon
2015-02-09 15:53 ` Paul Walmsley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox