diff options
author | Jason Yan <yanaijie@huawei.com> | 2020-08-31 11:11:24 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-09-03 05:49:07 +0300 |
commit | 6c53316d48989f95986d3fa78c38b8ca90905bbb (patch) | |
tree | d87377e189f0e0c8ab1475ef8d2a0cce92c4e8a7 /drivers/scsi/fnic | |
parent | c65b4f37db46c1b2e213d1c7f4baadf998f50fff (diff) | |
download | linux-6c53316d48989f95986d3fa78c38b8ca90905bbb.tar.xz |
scsi: fnic: Remove set but not used variable in is_fnic_fip_flogi_reject()
This addresses the following gcc warning with "make W=1":
drivers/scsi/fnic/fnic_fcs.c: In function ‘is_fnic_fip_flogi_reject’:
drivers/scsi/fnic/fnic_fcs.c:317:9: warning: variable ‘els_len’ set but
not used [-Wunused-but-set-variable]
317 | size_t els_len = 0;
| ^~~~~~~
drivers/scsi/fnic/fnic_fcs.c:312:21: warning: variable ‘els_dtype’ set
but not used [-Wunused-but-set-variable]
312 | enum fip_desc_type els_dtype = 0;
| ^~~~~~~~~
Link: https://lore.kernel.org/r/20200831081126.3251288-3-yanaijie@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/fnic')
-rw-r--r-- | drivers/scsi/fnic/fnic_fcs.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c index 673887e383cc..894c0d28c534 100644 --- a/drivers/scsi/fnic/fnic_fcs.c +++ b/drivers/scsi/fnic/fnic_fcs.c @@ -309,12 +309,10 @@ static inline int is_fnic_fip_flogi_reject(struct fcoe_ctlr *fip, struct fc_frame_header *fh = NULL; struct fip_desc *desc; struct fip_encaps *els; - enum fip_desc_type els_dtype = 0; u16 op; u8 els_op; u8 sub; - size_t els_len = 0; size_t rlen; size_t dlen = 0; @@ -346,10 +344,8 @@ static inline int is_fnic_fip_flogi_reject(struct fcoe_ctlr *fip, if (dlen < sizeof(*els) + sizeof(*fh) + 1) return 0; - els_len = dlen - sizeof(*els); els = (struct fip_encaps *)desc; fh = (struct fc_frame_header *)(els + 1); - els_dtype = desc->fip_dtype; if (!fh) return 0; |