diff options
author | Jason Yan <yanaijie@huawei.com> | 2020-09-07 09:45:18 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-09-10 04:37:48 +0200 |
commit | c8d67fbb60859d28d02ae431c5dd5641e3553f49 (patch) | |
tree | 914747e05743eb7e95ea6b5ee727d90018797243 /drivers/scsi/qla1280.c | |
parent | scsi: qla1280: Remove set but not used variable in qla1280_mailbox_command() (diff) | |
download | linux-c8d67fbb60859d28d02ae431c5dd5641e3553f49.tar.xz linux-c8d67fbb60859d28d02ae431c5dd5641e3553f49.zip |
scsi: qla1280: Remove set but not used variable in qla1280_status_entry()
This addresses the following gcc warning with "make W=1":
drivers/scsi/qla1280.c: In function ‘qla1280_status_entry’:
drivers/scsi/qla1280.c:3607:28: warning: variable ‘lun’ set but not used
[-Wunused-but-set-variable]
3607 | unsigned int bus, target, lun;
| ^~~
drivers/scsi/qla1280.c:3607:20: warning: variable ‘target’ set but not
used [-Wunused-but-set-variable]
3607 | unsigned int bus, target, lun;
| ^~~~~~
drivers/scsi/qla1280.c:3607:15: warning: variable ‘bus’ set but not used
[-Wunused-but-set-variable]
3607 | unsigned int bus, target, lun;
| ^~~
Link: https://lore.kernel.org/r/20200907074518.2326360-5-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/qla1280.c')
-rw-r--r-- | drivers/scsi/qla1280.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index fe4b88aaf5cb..545936cb3980 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -3601,7 +3601,6 @@ static void qla1280_status_entry(struct scsi_qla_host *ha, struct response *pkt, struct list_head *done_q) { - unsigned int bus, target, lun; int sense_sz; struct srb *sp; struct scsi_cmnd *cmd; @@ -3627,11 +3626,6 @@ qla1280_status_entry(struct scsi_qla_host *ha, struct response *pkt, cmd = sp->cmd; - /* Generate LU queue on cntrl, target, LUN */ - bus = SCSI_BUS_32(cmd); - target = SCSI_TCN_32(cmd); - lun = SCSI_LUN_32(cmd); - if (comp_status || scsi_status) { dprintk(3, "scsi: comp_status = 0x%x, scsi_status = " "0x%x, handle = 0x%x\n", comp_status, @@ -3670,7 +3664,8 @@ qla1280_status_entry(struct scsi_qla_host *ha, struct response *pkt, dprintk(2, "qla1280_status_entry: Check " "condition Sense data, b %i, t %i, " - "l %i\n", bus, target, lun); + "l %i\n", SCSI_BUS_32(cmd), SCSI_TCN_32(cmd), + SCSI_LUN_32(cmd)); if (sense_sz) qla1280_dump_buffer(2, (char *)cmd->sense_buffer, |