summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rix <trix@redhat.com>2023-03-26 03:32:22 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2023-04-03 04:37:57 +0300
commite324dd00fd17906ad9f0386f5e15d78da2e2b9fe (patch)
treea94f1b6e19bbf558112c621a211b9c901e5b0c52
parentca62009eff728c0a62ea76184adcc6be411f4066 (diff)
downloadlinux-e324dd00fd17906ad9f0386f5e15d78da2e2b9fe.tar.xz
scsi: scsi_transport_fc: Remove unused 'desc_cnt' variable
clang with W=1 reports: drivers/scsi/scsi_transport_fc.c:908:6: error: variable 'desc_cnt' set but not used [-Werror,-Wunused-but-set-variable] u32 desc_cnt = 0, bytes_remain; ^ This variable is not used so remove it. Signed-off-by: Tom Rix <trix@redhat.com> Link: https://lore.kernel.org/r/20230326003222.1343671-1-trix@redhat.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Reviewed-by: Benjamin Block <bblock@linux.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/scsi_transport_fc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index f12e9467ebb4..64ff2629eaf9 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -905,7 +905,7 @@ fc_host_fpin_rcv(struct Scsi_Host *shost, u32 fpin_len, char *fpin_buf,
{
struct fc_els_fpin *fpin = (struct fc_els_fpin *)fpin_buf;
struct fc_tlv_desc *tlv;
- u32 desc_cnt = 0, bytes_remain;
+ u32 bytes_remain;
u32 dtag;
enum fc_host_event_code event_code =
event_acknowledge ? FCH_EVT_LINK_FPIN_ACK : FCH_EVT_LINK_FPIN;
@@ -932,7 +932,6 @@ fc_host_fpin_rcv(struct Scsi_Host *shost, u32 fpin_len, char *fpin_buf,
fc_fpin_congn_stats_update(shost, tlv);
}
- desc_cnt++;
bytes_remain -= FC_TLV_DESC_SZ_FROM_LENGTH(tlv);
tlv = fc_tlv_next_desc(tlv);
}