Skip to contentSkip to conversation

RDMA/bnxt_re: Fix the sparse warnings

PATCH Applied Selvin Xavier 2 participants 2 messages Dec 20, 2023

Subsystems (2)
lore
Share & tools
lore

Selvin Xavier

author maintainer
#0 lore raw

PATCH 1/1 RDMA/bnxt_re: Fix the sparse warnings

Fix the following warnings reported

drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:909:27: warning: invalid assignment: |=
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:909:27: left side has type restricted __le16
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:909:27: right side has type unsigned long
...
drivers/infiniband/hw/bnxt_re/qplib_fp.c:1620:44: warning: invalid assignment: |=
drivers/infiniband/hw/bnxt_re/qplib_fp.c:1620:44: left side has type restricted __le64
drivers/infiniband/hw/bnxt_re/qplib_fp.c:1620:44: right side has type unsigned long long

Fixes 07f830ae4913 ("RDMA/bnxt_re: Adds MSN table capability for Gen P7 adapters")
---
 drivers/infiniband/hw/bnxt_re/qplib_fp.h   | 2 +-
 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/hw/bnxt_re/qplib_fp.h +1 -1
index 967c669..7fd4506 100644
@@ -632,7 +632,7 @@ static inline u16 bnxt_qplib_calc_ilsize(struct bnxt_qplib_swqe *wqe, u16 max)
 }
 
 /* MSN table update inlin */
-static inline uint64_t bnxt_re_update_msn_tbl(u32 st_idx, u32 npsn, u32 start_psn)
+static inline __le64 bnxt_re_update_msn_tbl(u32 st_idx, u32 npsn, u32 start_psn)
 {
 	return cpu_to_le64((((u64)(st_idx) << SQ_MSN_SEARCH_START_IDX_SFT) &
 		SQ_MSN_SEARCH_START_IDX_MASK) |
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c +1 -1
index 0ea7ccc..3ffaef0c 100644
@@ -906,7 +906,7 @@ int bnxt_qplib_init_rcfw(struct bnxt_qplib_rcfw *rcfw,
 
 skip_ctx_setup:
 	if (BNXT_RE_HW_RETX(rcfw->res->dattr->dev_cap_flags))
-		req.flags |= CMDQ_INITIALIZE_FW_FLAGS_HW_REQUESTER_RETX_SUPPORTED;
+		req.flags |= cpu_to_le16(CMDQ_INITIALIZE_FW_FLAGS_HW_REQUESTER_RETX_SUPPORTED);
 	req.stat_ctx_id = cpu_to_le32(ctx->stats.fw_id);
 	bnxt_qplib_fill_cmdqmsg(&msg, &req, &resp, NULL, sizeof(req), sizeof(resp), 0);
 	rc = bnxt_qplib_rcfw_send_message(rcfw, &msg);
Signature · 1 line
2.5.5
#1 lore raw
Quoted 11 lines · Selvin Xavier

Fix the following warnings reported

drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:909:27: warning: invalid assignment: |=
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:909:27: left side has type restricted __le16
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:909:27: right side has type unsigned long
...
drivers/infiniband/hw/bnxt_re/qplib_fp.c:1620:44: warning: invalid assignment: |=
drivers/infiniband/hw/bnxt_re/qplib_fp.c:1620:44: left side has type restricted __le64
drivers/infiniband/hw/bnxt_re/qplib_fp.c:1620:44: right side has type unsigned long long

[...]

Applied, thanks!

[1/1] RDMA/bnxt_re: Fix the sparse warnings

      https://git.kernel.org/rdma/rdma/c/82a8903a9f9f3f

Best regards,

Signature · 1 line
Leon Romanovsky <[email protected]>