Blob Blame History Raw
From: Kamal Heib <kamalheib1@gmail.com>
Date: Sun, 5 Dec 2021 22:45:37 +0200
Subject: RDMA/bnxt_re: Fix endianness warning for req.pkey
Patch-mainline: v5.17-rc1
Git-commit: 0a0575a12e31657415d1d5f799d4b65f3c9e8ba4
References: jsc#PED-1494

Fix the following sparse warning:

drivers/infiniband/hw/bnxt_re/qplib_fp.c:1260:26: sparse: warning: incorrect type in assignment (different base types)

Fixes: 0e938533d96d ("RDMA/bnxt_re: Remove dynamic pkey table")
Link: https://lore.kernel.org/r/20211205204537.14184-1-kamalheib1@gmail.com
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Acked-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 drivers/infiniband/hw/bnxt_re/qplib_fp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
@@ -1257,7 +1257,7 @@ int bnxt_qplib_modify_qp(struct bnxt_qpl
 		req.access = qp->access;
 
 	if (bmask & CMDQ_MODIFY_QP_MODIFY_MASK_PKEY)
-		req.pkey = IB_DEFAULT_PKEY_FULL;
+		req.pkey = cpu_to_le16(IB_DEFAULT_PKEY_FULL);
 
 	if (bmask & CMDQ_MODIFY_QP_MODIFY_MASK_QKEY)
 		req.qkey = cpu_to_le32(qp->qkey);