Commit bef7afbf authored by Jason Yan's avatar Jason Yan Committed by Martin K. Petersen

scsi: mptscsih: Remove set but not used 'timeleft'

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;
      |                 ^~~~~~~~

Link: https://lore.kernel.org/r/20200827125925.428357-1-yanaijie@huawei.comReported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 7149e0cb
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment