diff options
author | Colin Ian King <colin.i.king@gmail.com> | 2022-11-01 10:53:26 +0000 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-11-08 03:49:39 +0000 |
commit | bc81131813aaf6fe764d1cc6b942a35a8c0c5c36 (patch) | |
tree | 70024127637081d5a9e675b9df03c8e49c633070 /drivers/target | |
parent | 0aa46eba29553035d6af8384f19dfee2258d2a46 (diff) |
scsi: target: core: Remove unused variable 'unit_serial_len'
Variable 'unit_serial_len' is just being assigned and it's never used
anywhere else. Remove it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20221101105326.31037-1-colin.i.king@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_spc.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c index ffe02e195733..621a460ba234 100644 --- a/drivers/target/target_core_spc.c +++ b/drivers/target/target_core_spc.c @@ -227,7 +227,7 @@ spc_emulate_evpd_83(struct se_cmd *cmd, unsigned char *buf) struct t10_alua_tg_pt_gp *tg_pt_gp; unsigned char *prod = &dev->t10_wwn.model[0]; u32 prod_len; - u32 unit_serial_len, off = 0; + u32 off = 0; u16 len = 0, id_len; off = 4; @@ -272,13 +272,9 @@ check_t10_vend_desc: prod_len += strlen(prod); prod_len++; /* For : */ - if (dev->dev_flags & DF_EMULATED_VPD_UNIT_SERIAL) { - unit_serial_len = strlen(&dev->t10_wwn.unit_serial[0]); - unit_serial_len++; /* For NULL Terminator */ - + if (dev->dev_flags & DF_EMULATED_VPD_UNIT_SERIAL) id_len += sprintf(&buf[off+12], "%s:%s", prod, &dev->t10_wwn.unit_serial[0]); - } buf[off] = 0x2; /* ASCII */ buf[off+1] = 0x1; /* T10 Vendor ID */ buf[off+2] = 0x0; |