Skip to contentSkip to conversation

qla2xxx: remove unused variables in func qla24xx_build_scsi_type_6_iocbs

PATCH Applied Nilesh Javali 2 participants 2 messages Aug 25, 2023

Subsystems (2)
lore
Share & tools
lore

Nilesh Javali

author maintainer
#0 lore raw

PATCH v2 1/1 qla2xxx: remove unused variables in func qla24xx_build_scsi_type_6_iocbs

Sparse warning reported,

drivers/scsi/qla2xxx/qla_iocb.c: In function 'qla24xx_build_scsi_type_6_iocbs':

Quoted 1 line
Quoted 1 line

drivers/scsi/qla2xxx/qla_iocb.c:594:29: warning: variable 'ha' set but not used [-Wunused-but-set-variable]

     594 |         struct qla_hw_data *ha;
         |                             ^~

Remove unused variables 'vha' and 'ha'.

---
v1->v2:
- remove unused variables

 drivers/scsi/qla2xxx/qla_iocb.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/scsi/qla2xxx/qla_iocb.c +0 -5
index 7fbd917f6e1f..4450c0d000cc 100644
@@ -591,8 +591,6 @@ qla24xx_build_scsi_type_6_iocbs(srb_t *sp, struct cmd_type_6 *cmd_pkt,
 	uint16_t tot_dsds)
 {
 	struct dsd64 *cur_dsd = NULL, *next_dsd;
-	scsi_qla_host_t	*vha;
-	struct qla_hw_data *ha;
 	struct scsi_cmnd *cmd;
 	struct	scatterlist *cur_seg;
 	uint8_t avail_dsds;
@@ -614,9 +612,6 @@ qla24xx_build_scsi_type_6_iocbs(srb_t *sp, struct cmd_type_6 *cmd_pkt,
 		return 0;
 	}
 
-	vha = sp->vha;
-	ha = vha->hw;
-
 	/* Set transfer direction */
 	if (cmd->sc_data_direction == DMA_TO_DEVICE) {
 		cmd_pkt->control_flags = cpu_to_le16(CF_WRITE_DATA);
Signature · 1 line
2.23.1
#1 lore raw

Nilesh,

Quoted 8 lines

Sparse warning reported,

drivers/scsi/qla2xxx/qla_iocb.c: In function 'qla24xx_build_scsi_type_6_iocbs':

Quoted 1 line
Quoted 1 line

drivers/scsi/qla2xxx/qla_iocb.c:594:29: warning: variable 'ha' set but not used [-Wunused-but-set-variable]

     594 |         struct qla_hw_data *ha;
         |                             ^~

Remove unused variables 'vha' and 'ha'.

Applied to 6.6/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering