RDMA/bnxt_re: Fix the sparse warnings
authorSelvin Xavier <selvin.xavier@broadcom.com>
Wed, 20 Dec 2023 04:31:57 +0000 (20:31 -0800)
committerLeon Romanovsky <leon@kernel.org>
Wed, 20 Dec 2023 08:10:56 +0000 (10:10 +0200)
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

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312200537.HoNqPL5L-lkp@intel.com/
Fixes: 07f830ae4913 ("RDMA/bnxt_re: Adds MSN table capability for Gen P7 adapters")
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Link: https://lore.kernel.org/r/1703046717-8914-1-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/bnxt_re/qplib_fp.h
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c

index 967c6691e413ed46fb3972fb8a538c641c9f0f92..7fd4506b3584f8b95d659a003c1511410a2efc24 100644 (file)
@@ -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) |
index 0ea7ccc70679f812e38b1875bc7e4a897556563b..3ffaef0c26519424c35e1c690faad3ca9e73fcf9 100644 (file)
@@ -906,7 +906,7 @@ config_vf_res:
 
 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);