All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RDMA/rxe: Remove the duplicate assignment of mr->map_shift
@ 2022-10-27  7:31 Xiao Yang
  2022-10-27  9:29 ` Li Zhijian
  2022-10-28 18:10 ` Jason Gunthorpe
  0 siblings, 2 replies; 3+ messages in thread
From: Xiao Yang @ 2022-10-27  7:31 UTC (permalink / raw)
  To: linux-rdma; +Cc: leon, jgg, Xiao Yang

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 <yangx.jy@fujitsu.com>
---
 drivers/infiniband/sw/rxe/rxe_mr.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c
index d4f10c2d1aa7..279fac4c21d0 100644
--- a/drivers/infiniband/sw/rxe/rxe_mr.c
+++ b/drivers/infiniband/sw/rxe/rxe_mr.c
@@ -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)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] RDMA/rxe: Remove the duplicate assignment of mr->map_shift
  2022-10-27  7:31 [PATCH] RDMA/rxe: Remove the duplicate assignment of mr->map_shift Xiao Yang
@ 2022-10-27  9:29 ` Li Zhijian
  2022-10-28 18:10 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Li Zhijian @ 2022-10-27  9:29 UTC (permalink / raw)
  To: Xiao Yang, linux-rdma; +Cc: leon, jgg



On 27/10/2022 15:31, Xiao Yang wrote:
> 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 <yangx.jy@fujitsu.com>
> ---
>   drivers/infiniband/sw/rxe/rxe_mr.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c
> index d4f10c2d1aa7..279fac4c21d0 100644
> --- a/drivers/infiniband/sw/rxe/rxe_mr.c
> +++ b/drivers/infiniband/sw/rxe/rxe_mr.c
> @@ -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 <lizhijian@fujitsu.com>


>   }
>   
>   static int rxe_mr_alloc(struct rxe_mr *mr, int num_buf)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] RDMA/rxe: Remove the duplicate assignment of mr->map_shift
  2022-10-27  7:31 [PATCH] RDMA/rxe: Remove the duplicate assignment of mr->map_shift Xiao Yang
  2022-10-27  9:29 ` Li Zhijian
@ 2022-10-28 18:10 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2022-10-28 18:10 UTC (permalink / raw)
  To: Xiao Yang; +Cc: linux-rdma, leon

On Thu, Oct 27, 2022 at 07:31:33AM +0000, Xiao Yang wrote:
> 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 <yangx.jy@fujitsu.com>
> Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
> ---
>  drivers/infiniband/sw/rxe/rxe_mr.c | 1 -
>  1 file changed, 1 deletion(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-28 18:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-27  7:31 [PATCH] RDMA/rxe: Remove the duplicate assignment of mr->map_shift Xiao Yang
2022-10-27  9:29 ` Li Zhijian
2022-10-28 18:10 ` Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.