RDMA/rxe: Remove the duplicate assignment of mr->map_shift
authorXiao Yang <yangx.jy@fujitsu.com>
Thu, 27 Oct 2022 07:31:33 +0000 (07:31 +0000)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 28 Oct 2022 18:08:41 +0000 (15:08 -0300)
mr->map_shift is set to ilog2(RXE_BUF_PER_MAP) in both rxe_mr_init() and
rxe_mr_alloc() so remove the duplicate one in rxe_mr_init().

Link: https://lore.kernel.org/r/1666855893-145-1-git-send-email-yangx.jy@fujitsu.com
Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com>
Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/rxe/rxe_mr.c

index 014c27b..bc08100 100644 (file)
@@ -62,7 +62,6 @@ static void rxe_mr_init(int access, struct rxe_mr *mr)
        mr->rkey = mr->ibmr.rkey = rkey;
 
        mr->state = RXE_MR_STATE_INVALID;
-       mr->map_shift = ilog2(RXE_BUF_PER_MAP);
 }
 
 static int rxe_mr_alloc(struct rxe_mr *mr, int num_buf)