Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1511623 > unrolled thread

[PATCH] HID: intel-ish-hid: Fix !CONFIG_PM build warning

Started byBorislav Petkov <bp@alien8.de>
First post2016-10-29 13:20 +0200
Last post2016-11-03 19:20 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] HID: intel-ish-hid: Fix !CONFIG_PM build warning Borislav Petkov <bp@alien8.de> - 2016-10-29 13:20 +0200
    Re: [PATCH] HID: intel-ish-hid: Fix !CONFIG_PM build warning Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2016-10-29 18:00 +0200
    Re: [PATCH] HID: intel-ish-hid: Fix !CONFIG_PM build warning Jiri Kosina <jikos@kernel.org> - 2016-11-03 19:20 +0100

#1511623 — [PATCH] HID: intel-ish-hid: Fix !CONFIG_PM build warning

FromBorislav Petkov <bp@alien8.de>
Date2016-10-29 13:20 +0200
Subject[PATCH] HID: intel-ish-hid: Fix !CONFIG_PM build warning
Message-ID<sxzQ5-5uj-7@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1511827

FromSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date2016-10-29 18:00 +0200
Message-ID<sxEd3-89L-3@gated-at.bofh.it>
In reply to#1511623
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,

[toc] | [prev] | [next] | [standalone]


#1514768

FromJiri Kosina <jikos@kernel.org>
Date2016-11-03 19:20 +0100
Message-ID<szuMh-7u4-19@gated-at.bofh.it>
In reply to#1511623
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web