提交 378c538d 编写于 作者: A Armen Baloyan 提交者: James Bottomley

[SCSI] qla2xxx: fix sparse warning "large integer implicitly truncated to unsigned type"

Found by 0 day test project
Reported-by: NFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: NArmen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: NSaurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 b90ebc3d
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册