mirror of https://gitee.com/openkylin/linux.git
scsi: hisi_sas: Change the type of some numbers to unsigned
It reports a error as follows from some tools at two places in our code: runtime error: left shift of 4 by 29 places cannot be represented in type 'int' So change the type of the two numbers to unsigned to avoid the error. Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
c7669f5012
commit
0ab7bc825a
|
@ -1344,7 +1344,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);
|
||||
else
|
||||
hdr->dw0 |= cpu_to_le32(4 << CMD_HDR_CMD_OFF);
|
||||
hdr->dw0 |= cpu_to_le32(4U << CMD_HDR_CMD_OFF);
|
||||
|
||||
switch (task->data_dir) {
|
||||
case DMA_TO_DEVICE:
|
||||
|
@ -1412,7 +1412,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) |
|
||||
|
|
Loading…
Reference in New Issue