RDMA/rxe: Remove the duplicate assignment of mr->map_shift

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>
This commit is contained in:
Xiao Yang 2022-10-27 07:31:33 +00:00 committed by Jason Gunthorpe
parent 875ab4a8d9
commit b071850ef6

View File

@ -62,7 +62,6 @@ static void rxe_mr_init(int access, struct rxe_mr *mr)
mr->rkey = mr->ibmr.rkey = rkey; mr->rkey = mr->ibmr.rkey = rkey;
mr->state = RXE_MR_STATE_INVALID; 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) static int rxe_mr_alloc(struct rxe_mr *mr, int num_buf)