summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorTom Rix <trix@redhat.com>2023-03-28 03:16:47 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2023-04-03 04:47:36 +0300
commit4e0966a4829178b3cc7d8dc8686d9d6fcc221187 (patch)
treecfa02c05d2d9d6dccdd192806e6ab7f66e321953 /drivers/scsi
parent7866e03b9825e1e08fc5136d3ab9a35ebabdc7f5 (diff)
downloadlinux-4e0966a4829178b3cc7d8dc8686d9d6fcc221187.tar.xz
scsi: snic: Remove unused 'xfer_len' variable
clang with W=1 reports: drivers/scsi/snic/snic_scsi.c:490:6: error: variable 'xfer_len' set but not used [-Werror,-Wunused-but-set-variable] u64 xfer_len = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix <trix@redhat.com> Link: https://lore.kernel.org/r/20230328001647.1778448-1-trix@redhat.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/snic/snic_scsi.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/scsi/snic/snic_scsi.c b/drivers/scsi/snic/snic_scsi.c
index 961af6fc21bc..c50ede326cc4 100644
--- a/drivers/scsi/snic/snic_scsi.c
+++ b/drivers/scsi/snic/snic_scsi.c
@@ -487,7 +487,6 @@ snic_process_icmnd_cmpl_status(struct snic *snic,
struct scsi_cmnd *sc)
{
u8 scsi_stat = icmnd_cmpl->scsi_status;
- u64 xfer_len = 0;
int ret = 0;
/* Mark the IO as complete */
@@ -496,15 +495,11 @@ snic_process_icmnd_cmpl_status(struct snic *snic,
if (likely(cmpl_stat == SNIC_STAT_IO_SUCCESS)) {
sc->result = (DID_OK << 16) | scsi_stat;
- xfer_len = scsi_bufflen(sc);
-
/* Update SCSI Cmd with resid value */
scsi_set_resid(sc, le32_to_cpu(icmnd_cmpl->resid));
- if (icmnd_cmpl->flags & SNIC_ICMND_CMPL_UNDR_RUN) {
- xfer_len -= le32_to_cpu(icmnd_cmpl->resid);
+ if (icmnd_cmpl->flags & SNIC_ICMND_CMPL_UNDR_RUN)
atomic64_inc(&snic->s_stats.misc.io_under_run);
- }
if (icmnd_cmpl->scsi_status == SAM_STAT_TASK_SET_FULL)
atomic64_inc(&snic->s_stats.misc.qfull);