Commit 4e541deb authored by Bart Van Assche's avatar Bart Van Assche Committed by James Bottomley
Browse files

[SCSI] qla2xxx: Remove a dead assignment in qla24xx_build_scsi_crc_2_iocbs().



Since the value of cur_seg is not used and since scsi_prot_sglist()
has no side effects it is safe to remove the statement
"cur_seg = scsi_port_sglist(cmd)". Detected by Coverity.

Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarSaurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent c5dcfaac
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -1189,7 +1189,6 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt,
	uint32_t		*cur_dsd, *fcp_dl;
	uint32_t		*cur_dsd, *fcp_dl;
	scsi_qla_host_t		*vha;
	scsi_qla_host_t		*vha;
	struct scsi_cmnd	*cmd;
	struct scsi_cmnd	*cmd;
	struct scatterlist	*cur_seg;
	int			sgc;
	int			sgc;
	uint32_t		total_bytes = 0;
	uint32_t		total_bytes = 0;
	uint32_t		data_bytes;
	uint32_t		data_bytes;
@@ -1396,7 +1395,6 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt,


	if (bundling && tot_prot_dsds) {
	if (bundling && tot_prot_dsds) {
		/* Walks dif segments */
		/* Walks dif segments */
		cur_seg = scsi_prot_sglist(cmd);
		cmd_pkt->control_flags |=
		cmd_pkt->control_flags |=
			__constant_cpu_to_le16(CF_DIF_SEG_DESCR_ENABLE);
			__constant_cpu_to_le16(CF_DIF_SEG_DESCR_ENABLE);
		cur_dsd = (uint32_t *) &crc_ctx_pkt->u.bundling.dif_address;
		cur_dsd = (uint32_t *) &crc_ctx_pkt->u.bundling.dif_address;