diff options
author | Lang Cheng <chenglang@huawei.com> | 2019-08-21 16:14:32 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2019-08-28 18:57:26 +0300 |
commit | bfe860351e31e71913d4e6c46aae5724b661a519 (patch) | |
tree | 5079a64079d1eee5dd5731c4dbeaf519d702cff9 /drivers/infiniband/hw/hns/hns_roce_device.h | |
parent | 90c559b1864aa52518c10d5535bf5d5ea74189e5 (diff) | |
download | linux-bfe860351e31e71913d4e6c46aae5724b661a519.tar.xz |
RDMA/hns: Fix cast from or to restricted __le32 for driver
Sparse is whining about the u32 and __le32 mixed usage in the driver.
The roce_set_field() is used to __le32 data of hardware only.
If a variable is not delivered to the hardware, the __le32 type and
related operations are not required.
Signed-off-by: Lang Cheng <chenglang@huawei.com>
Link: https://lore.kernel.org/r/1566393276-42555-6-git-send-email-oulijun@huawei.com
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hns/hns_roce_device.h')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_device.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_device.h b/drivers/infiniband/hw/hns/hns_roce_device.h index 5eb7134f2fce..96d1302abde1 100644 --- a/drivers/infiniband/hw/hns/hns_roce_device.h +++ b/drivers/infiniband/hw/hns/hns_roce_device.h @@ -657,7 +657,7 @@ struct hns_roce_qp { u8 rdb_en; u8 sdb_en; u32 doorbell_qpn; - __le32 sq_signal_bits; + u32 sq_signal_bits; u32 sq_next_wqe; struct hns_roce_wq sq; @@ -712,7 +712,7 @@ enum { }; struct hns_roce_ceqe { - u32 comp; + __le32 comp; }; struct hns_roce_aeqe { |