All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: mptscsih: remove set but not used 'timeleft'
@ 2020-08-27 12:59 Jason Yan
  2020-09-09  2:09 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Yan @ 2020-08-27 12:59 UTC (permalink / raw)
  To: sathya.prakash, sreekanth.reddy, suganath-prabu.subramani,
	MPT-FusionLinux.pdl, linux-scsi, linux-kernel
  Cc: Jason Yan, Hulk Robot

This addresses the following gcc warning with "make W=1":

drivers/message/fusion/mptscsih.c: In function ‘mptscsih_IssueTaskMgmt’:
drivers/message/fusion/mptscsih.c:1519:17: warning: variable ‘timeleft’
set but not used [-Wunused-but-set-variable]
 1519 |  unsigned long  timeleft;
      |                 ^~~~~~~~

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/message/fusion/mptscsih.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index 8543f0324d5a..a5ef9faf71c7 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -1516,7 +1516,6 @@ mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, u64 lun,
 	int		 ii;
 	int		 retval;
 	MPT_ADAPTER 	*ioc = hd->ioc;
-	unsigned long	 timeleft;
 	u8		 issue_hard_reset;
 	u32		 ioc_raw_state;
 	unsigned long	 time_count;
@@ -1614,7 +1613,7 @@ mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, u64 lun,
 		}
 	}
 
-	timeleft = wait_for_completion_timeout(&ioc->taskmgmt_cmds.done,
+	wait_for_completion_timeout(&ioc->taskmgmt_cmds.done,
 		timeout*HZ);
 	if (!(ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
 		retval = FAILED;
-- 
2.25.4


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

* Re: [PATCH] scsi: mptscsih: remove set but not used 'timeleft'
  2020-08-27 12:59 [PATCH] scsi: mptscsih: remove set but not used 'timeleft' Jason Yan
@ 2020-09-09  2:09 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2020-09-09  2:09 UTC (permalink / raw)
  To: MPT-FusionLinux.pdl, sathya.prakash, sreekanth.reddy, Jason Yan,
	suganath-prabu.subramani, linux-scsi, linux-kernel
  Cc: Martin K . Petersen, Hulk Robot

On Thu, 27 Aug 2020 20:59:25 +0800, Jason Yan wrote:

> This addresses the following gcc warning with "make W=1":
> 
> drivers/message/fusion/mptscsih.c: In function ‘mptscsih_IssueTaskMgmt’:
> drivers/message/fusion/mptscsih.c:1519:17: warning: variable ‘timeleft’
> set but not used [-Wunused-but-set-variable]
>  1519 |  unsigned long  timeleft;
>       |                 ^~~~~~~~

Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: mptscsih: Remove set but not used 'timeleft'
      https://git.kernel.org/mkp/scsi/c/bef7afbf3bb6

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2020-09-09  2:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 12:59 [PATCH] scsi: mptscsih: remove set but not used 'timeleft' Jason Yan
2020-09-09  2:09 ` Martin K. Petersen

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.