linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/intel_mid_thermal: Fix suspend handlers unused warning
@ 2016-11-26 16:01 Borislav Petkov
  2016-12-03 14:31 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Borislav Petkov @ 2016-11-26 16:01 UTC (permalink / raw)
  To: LKML; +Cc: Darren Hart, platform-driver-x86

From: Borislav Petkov <bp@suse.de>

Fix:

  drivers/platform/x86/intel_mid_thermal.c:424:12: warning: ‘mid_thermal_resume’
  defined but not used [-Wunused-function]
   static int mid_thermal_resume(struct device *dev)
              ^
  drivers/platform/x86/intel_mid_thermal.c:436:12: warning: ‘mid_thermal_suspend’
  defined but not used [-Wunused-function]
   static int mid_thermal_suspend(struct device *dev)
              ^

which I see during randbuilds here.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Darren Hart <dvhart@infradead.org>
Cc: platform-driver-x86@vger.kernel.org
---
 drivers/platform/x86/intel_mid_thermal.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/platform/x86/intel_mid_thermal.c b/drivers/platform/x86/intel_mid_thermal.c
index 9f713b832ba3..0df3c9d37509 100644
--- a/drivers/platform/x86/intel_mid_thermal.c
+++ b/drivers/platform/x86/intel_mid_thermal.c
@@ -415,6 +415,7 @@ static struct thermal_device_info *initialize_sensor(int index)
 	return td_info;
 }
 
+#ifdef CONFIG_PM_SLEEP
 /**
  * mid_thermal_resume - resume routine
  * @dev: device structure
@@ -442,6 +443,7 @@ static int mid_thermal_suspend(struct device *dev)
 	 */
 	return configure_adc(0);
 }
+#endif
 
 static SIMPLE_DEV_PM_OPS(mid_thermal_pm,
 			 mid_thermal_suspend, mid_thermal_resume);
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86/intel_mid_thermal: Fix suspend handlers unused warning
  2016-11-26 16:01 [PATCH] x86/intel_mid_thermal: Fix suspend handlers unused warning Borislav Petkov
@ 2016-12-03 14:31 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2016-12-03 14:31 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: LKML, Darren Hart, platform-driver-x86

On Sat, Nov 26, 2016 at 6:01 PM, Borislav Petkov <bp@alien8.de> wrote:
> From: Borislav Petkov <bp@suse.de>
>
> Fix:
>
>   drivers/platform/x86/intel_mid_thermal.c:424:12: warning: ‘mid_thermal_resume’
>   defined but not used [-Wunused-function]
>    static int mid_thermal_resume(struct device *dev)
>               ^
>   drivers/platform/x86/intel_mid_thermal.c:436:12: warning: ‘mid_thermal_suspend’
>   defined but not used [-Wunused-function]
>    static int mid_thermal_suspend(struct device *dev)
>               ^
>
> which I see during randbuilds here.

Thanks!
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: Darren Hart <dvhart@infradead.org>
> Cc: platform-driver-x86@vger.kernel.org
> ---
>  drivers/platform/x86/intel_mid_thermal.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/platform/x86/intel_mid_thermal.c b/drivers/platform/x86/intel_mid_thermal.c
> index 9f713b832ba3..0df3c9d37509 100644
> --- a/drivers/platform/x86/intel_mid_thermal.c
> +++ b/drivers/platform/x86/intel_mid_thermal.c
> @@ -415,6 +415,7 @@ static struct thermal_device_info *initialize_sensor(int index)
>         return td_info;
>  }
>
> +#ifdef CONFIG_PM_SLEEP
>  /**
>   * mid_thermal_resume - resume routine
>   * @dev: device structure
> @@ -442,6 +443,7 @@ static int mid_thermal_suspend(struct device *dev)
>          */
>         return configure_adc(0);
>  }
> +#endif
>
>  static SIMPLE_DEV_PM_OPS(mid_thermal_pm,
>                          mid_thermal_suspend, mid_thermal_resume);
> --
> 2.10.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-03 14:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-26 16:01 [PATCH] x86/intel_mid_thermal: Fix suspend handlers unused warning Borislav Petkov
2016-12-03 14:31 ` Andy Shevchenko

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).