“d3e8b7569ad733c063a95dc1a51928e6e7c40652”上不存在“drivers/clocksource/nomadik-mtu.c”
提交 33ee8871 编写于 作者: G gaochuan4 提交者: Xie XiuQi

hisi_sas: Change int to unsigned int to avoid the overflow risk of left shift Operators.

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

"4 << 29" exceeds the max value of int type,
so "4" needs to be changed as unsigned int type.
Signed-off-by: Ngaochuan (E) <gaochuan4@huawei.com>
Reviewed-by: Nzhouyupeng1 <zhouyupeng1@huawei.com>
Reviewed-by: Nchenxiang <chenxiang66@hisilicon.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 6c9e09ae
......@@ -1458,7 +1458,7 @@ static void prep_ata_v3_hw(struct hisi_hba *hisi_hba,
if (parent_dev && DEV_IS_EXPANDER(parent_dev->dev_type))
hdr->dw0 |= cpu_to_le32(3 << CMD_HDR_CMD_OFF); /* STP */
else
hdr->dw0 |= cpu_to_le32(4 << CMD_HDR_CMD_OFF); /* SATA */
hdr->dw0 |= cpu_to_le32(4U << CMD_HDR_CMD_OFF); /* SATA */
switch (task->data_dir) {
case DMA_TO_DEVICE:
......@@ -1529,7 +1529,7 @@ static void prep_abort_v3_hw(struct hisi_hba *hisi_hba,
struct hisi_sas_port *port = slot->port;
/* dw0 */
hdr->dw0 = cpu_to_le32((5 << CMD_HDR_CMD_OFF) | /*abort*/
hdr->dw0 = cpu_to_le32((5U << CMD_HDR_CMD_OFF) | /*abort*/
(port->id << CMD_HDR_PORT_OFF) |
(dev_is_sata(dev)
<< CMD_HDR_ABORT_DEVICE_TYPE_OFF) |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册