Skip to content

Commit

Permalink
[SCSI] qla2xxx: fix sparse warning "large integer implicitly truncate…
Browse files Browse the repository at this point in the history
…d to unsigned type"

Found by 0 day test project

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Armen Baloyan authored and James Bottomley committed May 2, 2013
1 parent b90ebc3 commit 378c538
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/scsi/qla2xxx/qla_mr.c
Original file line number Diff line number Diff line change
@@ -3003,12 +3003,10 @@ qlafx00_build_scsi_iocbs(srb_t *sp, struct cmd_type_7_fx00 *cmd_pkt,

/* Set transfer direction */
if (cmd->sc_data_direction == DMA_TO_DEVICE) {
lcmd_pkt->cntrl_flags =
__constant_cpu_to_le16(TMF_WRITE_DATA);
lcmd_pkt->cntrl_flags = TMF_WRITE_DATA;
vha->qla_stats.output_bytes += scsi_bufflen(cmd);
} else if (cmd->sc_data_direction == DMA_FROM_DEVICE) {
lcmd_pkt->cntrl_flags =
__constant_cpu_to_le16(TMF_READ_DATA);
lcmd_pkt->cntrl_flags = TMF_READ_DATA;
vha->qla_stats.input_bytes += scsi_bufflen(cmd);
}

0 comments on commit 378c538

Please sign in to comment.