diff mbox series

[for-next] RDMA/bnxt_re: Fix endianness warning

Message ID 20211205204537.14184-1-kamalheib1@gmail.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show
Series [for-next] RDMA/bnxt_re: Fix endianness warning | expand

Commit Message

Kamal Heib Dec. 5, 2021, 8:45 p.m. UTC
Fix the following sparce warning:
CHECK   ../drivers/infiniband/hw/bnxt_re/qplib_fp.c
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")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
---
 drivers/infiniband/hw/bnxt_re/qplib_fp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Leon Romanovsky Dec. 6, 2021, 7:23 a.m. UTC | #1
On Sun, Dec 05, 2021 at 10:45:37PM +0200, Kamal Heib wrote:
> Fix the following sparce warning:
> CHECK   ../drivers/infiniband/hw/bnxt_re/qplib_fp.c
> 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")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> ---
>  drivers/infiniband/hw/bnxt_re/qplib_fp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

sparce -> sparse

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Selvin Xavier Dec. 6, 2021, 3:57 p.m. UTC | #2
On Mon, Dec 6, 2021 at 12:54 PM Leon Romanovsky <leon@kernel.org> wrote:
>
> On Sun, Dec 05, 2021 at 10:45:37PM +0200, Kamal Heib wrote:
> > Fix the following sparce warning:
> > CHECK   ../drivers/infiniband/hw/bnxt_re/qplib_fp.c
> > 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")
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> > ---
> >  drivers/infiniband/hw/bnxt_re/qplib_fp.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
>
> sparce -> sparse
>
> Thanks,
> Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Acked-by: Selvin Xavier <selvin.xavier@broadcom.com>
Jason Gunthorpe Dec. 6, 2021, 11:57 p.m. UTC | #3
On Sun, Dec 05, 2021 at 10:45:37PM +0200, Kamal Heib wrote:
> Fix the following sparce warning:
> CHECK   ../drivers/infiniband/hw/bnxt_re/qplib_fp.c
> 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")
> 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>
> ---
>  drivers/infiniband/hw/bnxt_re/qplib_fp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
index f6472cca9ec7..96e581ced50e 100644
--- 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_qplib_res *res, struct bnxt_qplib_qp *qp)
 		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);