Skip to content

Commit 0576cbd

Browse files
oulijunjgunthorpe
authored andcommitted
RDMA/hns: Fix endian conversions and annotations
This patch removes the warnings reported by sparse. Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
1 parent beae9eb commit 0576cbd

File tree

3 files changed

+245
-171
lines changed

3 files changed

+245
-171
lines changed

drivers/infiniband/hw/hns/hns_roce_device.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -579,22 +579,22 @@ struct hns_roce_ceqe {
579579
};
580580

581581
struct hns_roce_aeqe {
582-
u32 asyn;
582+
__le32 asyn;
583583
union {
584584
struct {
585-
u32 qp;
585+
__le32 qp;
586586
u32 rsv0;
587587
u32 rsv1;
588588
} qp_event;
589589

590590
struct {
591-
u32 cq;
591+
__le32 cq;
592592
u32 rsv0;
593593
u32 rsv1;
594594
} cq_event;
595595

596596
struct {
597-
u32 ceqe;
597+
__le32 ceqe;
598598
u32 rsv0;
599599
u32 rsv1;
600600
} ce_event;
@@ -864,7 +864,7 @@ static inline struct hns_roce_sqp *hr_to_hr_sqp(struct hns_roce_qp *hr_qp)
864864
return container_of(hr_qp, struct hns_roce_sqp, hr_qp);
865865
}
866866

867-
static inline void hns_roce_write64_k(__be32 val[2], void __iomem *dest)
867+
static inline void hns_roce_write64_k(__le32 val[2], void __iomem *dest)
868868
{
869869
__raw_writeq(*(u64 *) val, dest);
870870
}

0 commit comments

Comments
 (0)