Skip to content

Commit aa4d781

Browse files
Tom Rixmartinkpetersen
authored andcommitted
scsi: target: core: Remove unused 'prod_len' variable
clang with W=1 reports: drivers/target/target_core_spc.c:229:6: error: variable 'prod_len' set but not used [-Werror,-Wunused-but-set-variable] u32 prod_len; ^ This variable is not used so remove it. Signed-off-by: Tom Rix <trix@redhat.com> Link: https://lore.kernel.org/r/20230329132421.1809362-1-trix@redhat.com Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 0e4b179 commit aa4d781

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

drivers/target/target_core_spc.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ spc_emulate_evpd_83(struct se_cmd *cmd, unsigned char *buf)
226226
struct t10_alua_lu_gp_member *lu_gp_mem;
227227
struct t10_alua_tg_pt_gp *tg_pt_gp;
228228
unsigned char *prod = &dev->t10_wwn.model[0];
229-
u32 prod_len;
230229
u32 off = 0;
231230
u16 len = 0, id_len;
232231

@@ -267,10 +266,6 @@ spc_emulate_evpd_83(struct se_cmd *cmd, unsigned char *buf)
267266
* T10 Vendor Identifier Page, see spc4r17 section 7.7.3.4
268267
*/
269268
id_len = 8; /* For Vendor field */
270-
prod_len = 4; /* For VPD Header */
271-
prod_len += 8; /* For Vendor field */
272-
prod_len += strlen(prod);
273-
prod_len++; /* For : */
274269

275270
if (dev->dev_flags & DF_EMULATED_VPD_UNIT_SERIAL)
276271
id_len += sprintf(&buf[off+12], "%s:%s", prod,

0 commit comments

Comments
 (0)