2014-11-19 13:49:17

by Lee Jones

[permalink] [raw]
Subject: [PATCH] thermal: sti: Ignore suspend/resume functions when !PM

Prevents build warning:

st_thermal.c:278:12:
warning: ‘st_thermal_suspend’ defined but not used [-Wunused-function]
st_thermal.c:286:12:
warning: ‘st_thermal_resume’ defined but not used [-Wunused-function]

Signed-off-by: Lee Jones <[email protected]>
---
drivers/thermal/st/st_thermal.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/thermal/st/st_thermal.c b/drivers/thermal/st/st_thermal.c
index 90163b3..9841488 100644
--- a/drivers/thermal/st/st_thermal.c
+++ b/drivers/thermal/st/st_thermal.c
@@ -275,6 +275,7 @@ int st_thermal_unregister(struct platform_device *pdev)
}
EXPORT_SYMBOL_GPL(st_thermal_unregister);

+#ifdef CONFIG_PM
static int st_thermal_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
@@ -305,6 +306,8 @@ static int st_thermal_resume(struct device *dev)

return 0;
}
+#endif
+
SIMPLE_DEV_PM_OPS(st_thermal_pm_ops, st_thermal_suspend, st_thermal_resume);
EXPORT_SYMBOL_GPL(st_thermal_pm_ops);

--
1.9.1


2014-11-19 14:44:09

by Maxime Coquelin

[permalink] [raw]
Subject: Re: [STLinux Kernel] [PATCH] thermal: sti: Ignore suspend/resume functions when !PM


On 11/19/2014 02:48 PM, Lee Jones wrote:
> Prevents build warning:
>
> st_thermal.c:278:12:
> warning: ‘st_thermal_suspend’ defined but not used [-Wunused-function]
> st_thermal.c:286:12:
> warning: ‘st_thermal_resume’ defined but not used [-Wunused-function]
>
> Signed-off-by: Lee Jones <[email protected]>
You can add my:
Acked-by: Maxime Coquelin <[email protected]>

Thanks,
Maxime

> ---
> drivers/thermal/st/st_thermal.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/thermal/st/st_thermal.c b/drivers/thermal/st/st_thermal.c
> index 90163b3..9841488 100644
> --- a/drivers/thermal/st/st_thermal.c
> +++ b/drivers/thermal/st/st_thermal.c
> @@ -275,6 +275,7 @@ int st_thermal_unregister(struct platform_device *pdev)
> }
> EXPORT_SYMBOL_GPL(st_thermal_unregister);
>
> +#ifdef CONFIG_PM
> static int st_thermal_suspend(struct device *dev)
> {
> struct platform_device *pdev = to_platform_device(dev);
> @@ -305,6 +306,8 @@ static int st_thermal_resume(struct device *dev)
>
> return 0;
> }
> +#endif
> +
> SIMPLE_DEV_PM_OPS(st_thermal_pm_ops, st_thermal_suspend, st_thermal_resume);
> EXPORT_SYMBOL_GPL(st_thermal_pm_ops);
>

2014-11-19 14:57:47

by Fabio Estevam

[permalink] [raw]
Subject: Re: [PATCH] thermal: sti: Ignore suspend/resume functions when !PM

On Wed, Nov 19, 2014 at 11:48 AM, Lee Jones <[email protected]> wrote:
> Prevents build warning:
>
> st_thermal.c:278:12:
> warning: ‘st_thermal_suspend’ defined but not used [-Wunused-function]
> st_thermal.c:286:12:
> warning: ‘st_thermal_resume’ defined but not used [-Wunused-function]
>
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/thermal/st/st_thermal.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/thermal/st/st_thermal.c b/drivers/thermal/st/st_thermal.c
> index 90163b3..9841488 100644
> --- a/drivers/thermal/st/st_thermal.c
> +++ b/drivers/thermal/st/st_thermal.c
> @@ -275,6 +275,7 @@ int st_thermal_unregister(struct platform_device *pdev)
> }
> EXPORT_SYMBOL_GPL(st_thermal_unregister);
>
> +#ifdef CONFIG_PM

Actually this should be #ifdef CONFIG_PM_SLEEP instead

2014-11-19 15:50:03

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH] thermal: sti: Ignore suspend/resume functions when !PM

On Wed, 19 Nov 2014, Fabio Estevam wrote:

> On Wed, Nov 19, 2014 at 11:48 AM, Lee Jones <[email protected]> wrote:
> > Prevents build warning:
> >
> > st_thermal.c:278:12:
> > warning: ‘st_thermal_suspend’ defined but not used [-Wunused-function]
> > st_thermal.c:286:12:
> > warning: ‘st_thermal_resume’ defined but not used [-Wunused-function]
> >
> > Signed-off-by: Lee Jones <[email protected]>
> > ---
> > drivers/thermal/st/st_thermal.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/thermal/st/st_thermal.c b/drivers/thermal/st/st_thermal.c
> > index 90163b3..9841488 100644
> > --- a/drivers/thermal/st/st_thermal.c
> > +++ b/drivers/thermal/st/st_thermal.c
> > @@ -275,6 +275,7 @@ int st_thermal_unregister(struct platform_device *pdev)
> > }
> > EXPORT_SYMBOL_GPL(st_thermal_unregister);
> >
> > +#ifdef CONFIG_PM
>
> Actually this should be #ifdef CONFIG_PM_SLEEP instead

You're right, someone already pointed this out, thanks.

I will re-submit in ~1min.

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

2014-11-19 15:52:11

by Lee Jones

[permalink] [raw]
Subject: Re: [STLinux Kernel] [PATCH] thermal: sti: Ignore suspend/resume functions when !PM

On Wed, 19 Nov 2014, Maxime Coquelin wrote:

>
> On 11/19/2014 02:48 PM, Lee Jones wrote:
> >Prevents build warning:
> >
> >st_thermal.c:278:12:
> > warning: ‘st_thermal_suspend’ defined but not used [-Wunused-function]
> >st_thermal.c:286:12:
> > warning: ‘st_thermal_resume’ defined but not used [-Wunused-function]
> >
> >Signed-off-by: Lee Jones <[email protected]>
> You can add my:
> Acked-by: Maxime Coquelin <[email protected]>

Sorry Maxime, I made a booboo!

Resubmitted.

> >---
> > drivers/thermal/st/st_thermal.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> >diff --git a/drivers/thermal/st/st_thermal.c b/drivers/thermal/st/st_thermal.c
> >index 90163b3..9841488 100644
> >--- a/drivers/thermal/st/st_thermal.c
> >+++ b/drivers/thermal/st/st_thermal.c
> >@@ -275,6 +275,7 @@ int st_thermal_unregister(struct platform_device *pdev)
> > }
> > EXPORT_SYMBOL_GPL(st_thermal_unregister);
> >+#ifdef CONFIG_PM
> > static int st_thermal_suspend(struct device *dev)
> > {
> > struct platform_device *pdev = to_platform_device(dev);
> >@@ -305,6 +306,8 @@ static int st_thermal_resume(struct device *dev)
> > return 0;
> > }
> >+#endif
> >+
> > SIMPLE_DEV_PM_OPS(st_thermal_pm_ops, st_thermal_suspend, st_thermal_resume);
> > EXPORT_SYMBOL_GPL(st_thermal_pm_ops);
>

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog