All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] HID: intel-ish-hid: Fix !CONFIG_PM build warning
@ 2016-10-29 11:17 Borislav Petkov
  2016-10-29 15:49 ` Srinivas Pandruvada
  2016-11-03 18:12 ` Jiri Kosina
  0 siblings, 2 replies; 3+ messages in thread
From: Borislav Petkov @ 2016-10-29 11:17 UTC (permalink / raw)
  To: LKML
  Cc: Srinivas Pandruvada, Jiri Kosina, Benjamin Tissoires,
	Wei Yongjun, linux-input

From: Borislav Petkov <bp@suse.de>

Fix

  drivers/hid/intel-ish-hid/ipc/pci-ish.c:247:12: warning: ‘ish_suspend’ defined but not used [-Wunused-function]
   static int ish_suspend(struct device *device)
              ^
  drivers/hid/intel-ish-hid/ipc/pci-ish.c:282:12: warning: ‘ish_resume’ defined but not used [-Wunused-function]
   static int ish_resume(struct device *device)
            ^
by sticking them in the CONFIG_PM range too.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Wei Yongjun <weiyongjun1@huawei.com>
Cc: linux-input@vger.kernel.org
---
 drivers/hid/intel-ish-hid/ipc/pci-ish.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
index 42f0beeb09fd..7e3622a724aa 100644
--- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c
+++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
@@ -202,6 +202,7 @@ static void ish_remove(struct pci_dev *pdev)
 	kfree(ishtp_dev);
 }
 
+#ifdef CONFIG_PM
 static struct device *ish_resume_device;
 
 /**
@@ -293,7 +294,6 @@ static int ish_resume(struct device *device)
 	return 0;
 }
 
-#ifdef CONFIG_PM
 static const struct dev_pm_ops ish_pm_ops = {
 	.suspend = ish_suspend,
 	.resume = ish_resume,
@@ -301,7 +301,7 @@ static const struct dev_pm_ops ish_pm_ops = {
 #define ISHTP_ISH_PM_OPS	(&ish_pm_ops)
 #else
 #define ISHTP_ISH_PM_OPS	NULL
-#endif
+#endif /* CONFIG_PM */
 
 static struct pci_driver ish_driver = {
 	.name = KBUILD_MODNAME,
-- 
2.10.0

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

* Re: [PATCH] HID: intel-ish-hid: Fix !CONFIG_PM build warning
  2016-10-29 11:17 [PATCH] HID: intel-ish-hid: Fix !CONFIG_PM build warning Borislav Petkov
@ 2016-10-29 15:49 ` Srinivas Pandruvada
  2016-11-03 18:12 ` Jiri Kosina
  1 sibling, 0 replies; 3+ messages in thread
From: Srinivas Pandruvada @ 2016-10-29 15:49 UTC (permalink / raw)
  To: Borislav Petkov, LKML
  Cc: Jiri Kosina, Benjamin Tissoires, Wei Yongjun, linux-input

On Sat, 2016-10-29 at 13:17 +0200, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
> 
> Fix
> 
>   drivers/hid/intel-ish-hid/ipc/pci-ish.c:247:12: warning:
> ‘ish_suspend’ defined but not used [-Wunused-function]
>    static int ish_suspend(struct device *device)
>               ^
>   drivers/hid/intel-ish-hid/ipc/pci-ish.c:282:12: warning:
> ‘ish_resume’ defined but not used [-Wunused-function]
>    static int ish_resume(struct device *device)
>             ^
> by sticking them in the CONFIG_PM range too.
> 
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> Cc: Jiri Kosina <jikos@kernel.org>
> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Cc: Wei Yongjun <weiyongjun1@huawei.com>
> Cc: linux-input@vger.kernel.org

Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>-

> ---
>  drivers/hid/intel-ish-hid/ipc/pci-ish.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> index 42f0beeb09fd..7e3622a724aa 100644
> --- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> +++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> @@ -202,6 +202,7 @@ static void ish_remove(struct pci_dev *pdev)
>  	kfree(ishtp_dev);
>  }
>  
> +#ifdef CONFIG_PM
>  static struct device *ish_resume_device;
>  
>  /**
> @@ -293,7 +294,6 @@ static int ish_resume(struct device *device)
>  	return 0;
>  }
>  
> -#ifdef CONFIG_PM
>  static const struct dev_pm_ops ish_pm_ops = {
>  	.suspend = ish_suspend,
>  	.resume = ish_resume,
> @@ -301,7 +301,7 @@ static const struct dev_pm_ops ish_pm_ops = {
>  #define ISHTP_ISH_PM_OPS	(&ish_pm_ops)
>  #else
>  #define ISHTP_ISH_PM_OPS	NULL
> -#endif
> +#endif /* CONFIG_PM */
>  
>  static struct pci_driver ish_driver = {
>  	.name = KBUILD_MODNAME,

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

* Re: [PATCH] HID: intel-ish-hid: Fix !CONFIG_PM build warning
  2016-10-29 11:17 [PATCH] HID: intel-ish-hid: Fix !CONFIG_PM build warning Borislav Petkov
  2016-10-29 15:49 ` Srinivas Pandruvada
@ 2016-11-03 18:12 ` Jiri Kosina
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2016-11-03 18:12 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: LKML, Srinivas Pandruvada, Benjamin Tissoires, Wei Yongjun, linux-input

On Sat, 29 Oct 2016, Borislav Petkov wrote:

> From: Borislav Petkov <bp@suse.de>
> 
> Fix
> 
>   drivers/hid/intel-ish-hid/ipc/pci-ish.c:247:12: warning: ‘ish_suspend’ defined but not used [-Wunused-function]
>    static int ish_suspend(struct device *device)
>               ^
>   drivers/hid/intel-ish-hid/ipc/pci-ish.c:282:12: warning: ‘ish_resume’ defined but not used [-Wunused-function]
>    static int ish_resume(struct device *device)
>             ^
> by sticking them in the CONFIG_PM range too.

Applied to hid.git#for-4.9/upstream-fixes

Thanks,

-- 
Jiri Kosina
SUSE Labs

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-29 11:17 [PATCH] HID: intel-ish-hid: Fix !CONFIG_PM build warning Borislav Petkov
2016-10-29 15:49 ` Srinivas Pandruvada
2016-11-03 18:12 ` Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.