diff options
author | Gal Pressman <galpress@amazon.com> | 2024-06-24 16:09:14 +0000 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2024-06-26 12:34:43 -0300 |
commit | 47f9b4190a1d9db2db670c01af7deb648073e218 (patch) | |
tree | 7c4a0015344a5a6e952d7875ead736653122d2f8 | |
parent | 5a905e33b266f504e0b290055125e5002635e2e6 (diff) | |
download | lwn-47f9b4190a1d9db2db670c01af7deb648073e218.tar.gz lwn-47f9b4190a1d9db2db670c01af7deb648073e218.zip |
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 <sleybo@amazon.com>
Reviewed-by: Firas Jahjah <firasj@amazon.com>
Signed-off-by: Gal Pressman <galpress@amazon.com>
Signed-off-by: Michael Margolin <mrgolin@amazon.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
-rw-r--r-- | drivers/infiniband/hw/efa/efa_verbs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c index 8f7a13b79cdc..eee2ae215414 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, |