diff mbox series

HID: intel-ish-hid: Remove an unused variable 'ret'

Message ID 1617357988-108792-1-git-send-email-yang.lee@linux.alibaba.com (mailing list archive)
State Mainlined
Commit 3977e00eb33bcb62cffdf9475d047b347cf79e06
Delegated to: Jiri Kosina
Headers show
Series HID: intel-ish-hid: Remove an unused variable 'ret' | expand

Commit Message

Yang Li April 2, 2021, 10:06 a.m. UTC
Fixes the following W=1 kernel build warning(s):

drivers/hid/intel-ish-hid/ipc/pci-ish.c:264:6: warning: variable ‘ret’
set but not used

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/hid/intel-ish-hid/ipc/pci-ish.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Srinivas Pandruvada April 2, 2021, 2:46 p.m. UTC | #1
On Fri, 2021-04-02 at 18:06 +0800, Yang Li wrote:
> Fixes the following W=1 kernel build warning(s):
> 
> drivers/hid/intel-ish-hid/ipc/pci-ish.c:264:6: warning: variable
> ‘ret’
> set but not used
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

> ---
>  drivers/hid/intel-ish-hid/ipc/pci-ish.c | 3 +--
>  1 file changed, 1 insertion(+), 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 06081cf..61efc30 100644
> --- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> +++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> @@ -261,7 +261,6 @@ static void __maybe_unused
> ish_resume_handler(struct work_struct *work)
>  	struct pci_dev *pdev = to_pci_dev(ish_resume_device);
>  	struct ishtp_device *dev = pci_get_drvdata(pdev);
>  	uint32_t fwsts = dev->ops->get_fw_status(dev);
> -	int ret;
>  
>  	if (ish_should_leave_d0i3(pdev) && !dev->suspend_flag
>  			&& IPC_IS_ISH_ILUP(fwsts)) {
> @@ -273,7 +272,7 @@ static void __maybe_unused
> ish_resume_handler(struct work_struct *work)
>  
>  		/* Waiting to get resume response */
>  		if (dev->resume_flag)
> -			ret = wait_event_interruptible_timeout(dev-
> >resume_wait,
> +			wait_event_interruptible_timeout(dev-
> >resume_wait,
>  				!dev->resume_flag,
>  				msecs_to_jiffies(WAIT_FOR_RESUME_ACK_MS
> ));
>
diff mbox series

Patch

diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
index 06081cf..61efc30 100644
--- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c
+++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
@@ -261,7 +261,6 @@  static void __maybe_unused ish_resume_handler(struct work_struct *work)
 	struct pci_dev *pdev = to_pci_dev(ish_resume_device);
 	struct ishtp_device *dev = pci_get_drvdata(pdev);
 	uint32_t fwsts = dev->ops->get_fw_status(dev);
-	int ret;
 
 	if (ish_should_leave_d0i3(pdev) && !dev->suspend_flag
 			&& IPC_IS_ISH_ILUP(fwsts)) {
@@ -273,7 +272,7 @@  static void __maybe_unused ish_resume_handler(struct work_struct *work)
 
 		/* Waiting to get resume response */
 		if (dev->resume_flag)
-			ret = wait_event_interruptible_timeout(dev->resume_wait,
+			wait_event_interruptible_timeout(dev->resume_wait,
 				!dev->resume_flag,
 				msecs_to_jiffies(WAIT_FOR_RESUME_ACK_MS));