From: Gal Pressman Date: Mon, 24 Jun 2024 16:09:14 +0000 (+0000) Subject: RDMA/efa: Use offset_in_page() function X-Git-Tag: v6.11-rc1~116^2~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47f9b4190a1d9db2db670c01af7deb648073e218;p=thirdparty%2Flinux.git RDMA/efa: Use offset_in_page() function Use offset_in_page() instead of open-coding it. Link: https://lore.kernel.org/r/20240624160918.27060-2-mrgolin@amazon.com Reviewed-by: Yossi Leybovich Reviewed-by: Firas Jahjah Signed-off-by: Gal Pressman Signed-off-by: Michael Margolin Signed-off-by: Jason Gunthorpe --- diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c index 8f7a13b79cdc5..eee2ae215414b 100644 --- a/drivers/infiniband/hw/efa/efa_verbs.c +++ b/drivers/infiniband/hw/efa/efa_verbs.c @@ -524,7 +524,7 @@ static int qp_mmap_entries_setup(struct efa_qp *qp, address = dev->mem_bar_addr + resp->llq_desc_offset; length = PAGE_ALIGN(params->sq_ring_size_in_bytes + - (resp->llq_desc_offset & ~PAGE_MASK)); + offset_in_page(resp->llq_desc_offset)); qp->llq_desc_mmap_entry = efa_user_mmap_entry_insert(&ucontext->ibucontext,