Message ID | 20231103095549.490744-6-lizhijian@fujitsu.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | rxe_map_mr_sg() fix cleanup and refactor | expand |
diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c index d39c02f0c51e..a038133e1322 100644 --- a/drivers/infiniband/sw/rxe/rxe_mr.c +++ b/drivers/infiniband/sw/rxe/rxe_mr.c @@ -59,8 +59,6 @@ static void rxe_mr_init(int access, struct rxe_mr *mr) mr->access = access; mr->ibmr.page_size = PAGE_SIZE; - mr->page_mask = PAGE_MASK; - mr->page_shift = PAGE_SHIFT; mr->state = RXE_MR_STATE_INVALID; } @@ -230,8 +228,6 @@ int rxe_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sgl, } mr->nbuf = 0; - mr->page_shift = PAGE_SHIFT; - mr->page_mask = PAGE_MASK; return ib_sg_to_pages(ibmr, sgl, sg_nents, sg_offset, rxe_set_page); } diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.h b/drivers/infiniband/sw/rxe/rxe_verbs.h index ccc75f8c0985..ef813560b0ab 100644 --- a/drivers/infiniband/sw/rxe/rxe_verbs.h +++ b/drivers/infiniband/sw/rxe/rxe_verbs.h @@ -309,9 +309,6 @@ struct rxe_mr { int access; atomic_t num_mw; - unsigned int page_shift; - u64 page_mask; - u32 num_buf; u32 nbuf;
This 2 elements were believed to be designed for extracting address from the page_list before. But now we use PAGE_SIZE and PAGE_SHIFT directly, so we can drop it. Signed-off-by: Li Zhijian <lizhijian@fujitsu.com> --- drivers/infiniband/sw/rxe/rxe_mr.c | 4 ---- drivers/infiniband/sw/rxe/rxe_verbs.h | 3 --- 2 files changed, 7 deletions(-)