RDMA/rxe: Remove the duplicate assignment of mr->map_shift
Subsystems (2)
PATCH 1/1 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().
Signed-off-by Xiao Yang <[email protected]>
--- drivers/infiniband/sw/rxe/rxe_mr.c | 1 - 1 file changed, 1 deletion(-)
drivers/infiniband/sw/rxe/rxe_mr.c +0 -1
@@ -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)
Signature · 1 line
2.34.1
Quoted 13 lines · Xiao Yang
mr->map_shiftis set toilog2(RXE_BUF_PER_MAP)in bothrxe_mr_init()andrxe_mr_alloc()so remove the duplicate one inrxe_mr_init().Signed-off-by Xiao Yang <[email protected]>--- drivers/infiniband/sw/rxe/rxe_mr.c | 1 - 1 file changed, 1 deletion(-)drivers/infiniband/sw/rxe/rxe_mr.c +0
-0
drivers/infiniband/sw/rxe/rxe_mr.c static void rxe_mr_init(int access, struct rxe_mr *mr) · line 65
Quoted 4 lines
drivers/infiniband/sw/rxe/rxe_mr.c +0
-1@@ -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 );
Good catch.
Reviewed-by Li Zhijian <[email protected]>
Quoted 3 lines
drivers/infiniband/sw/rxe/rxe_mr.c +0
-0}static int rxe_mr_alloc (struct rxe_mr *mr,int num_buf)
Quoted 8 lines · Xiao Yang
mr->map_shiftis set toilog2(RXE_BUF_PER_MAP)in bothrxe_mr_init()andrxe_mr_alloc()so remove the duplicate one inrxe_mr_init().Signed-off-by Xiao Yang <[email protected]>Reviewed-by Li Zhijian <[email protected]>--- drivers/infiniband/sw/rxe/rxe_mr.c | 1 - 1 file changed, 1 deletion(-)
Applied to for-next, thanks
Jason