Skip to content

Commit b834407

Browse files
committed
RDMA/mlx5: Fix incorrect MKEY masking
mkey_mask is __be64 type, while MLX5_MKEY_MASK_PAGE_SIZE is declared as unsigned long long. This causes to the static checkers errors: drivers/infiniband/hw/mlx5/umr.c:663:49: warning: invalid assignment: &= drivers/infiniband/hw/mlx5/umr.c:663:49: left side has type restricted __be64 drivers/infiniband/hw/mlx5/umr.c:663:49: right side has type int Fixes: e73242a ("RDMA/mlx5: Optimize DMABUF mkey page size") Link: https://patch.msgid.link/e354d70b98dfa5ecf4c236a36cd36b64add9d9de.1753003467.git.leon@kernel.org Signed-off-by: Leon Romanovsky <[email protected]>
1 parent d59ebb4 commit b834407

File tree

1 file changed

+2
-1
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+2
-1
lines changed

drivers/infiniband/hw/mlx5/umr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,8 @@ static void mlx5r_umr_final_update_xlt(struct mlx5_ib_dev *dev,
660660
if (!mr->ibmr.length)
661661
MLX5_SET(mkc, &wqe->mkey_seg, length64, 1);
662662
if (flags & MLX5_IB_UPD_XLT_KEEP_PGSZ)
663-
wqe->ctrl_seg.mkey_mask &= ~MLX5_MKEY_MASK_PAGE_SIZE;
663+
wqe->ctrl_seg.mkey_mask &=
664+
cpu_to_be64(~MLX5_MKEY_MASK_PAGE_SIZE);
664665
}
665666

666667
wqe->ctrl_seg.xlt_octowords =

0 commit comments

Comments
 (0)