summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/mlx5/mem.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2020-10-26 15:19:36 +0200
committerJason Gunthorpe <jgg@nvidia.com>2020-11-02 14:52:26 -0400
commitf8fb3110635c91a375399450dc5a4a79a83b0414 (patch)
tree1b1815753d6c0a4c4a2c2df4a79d93073dc244e6 /drivers/infiniband/hw/mlx5/mem.c
parent7db0eea916dcc050811f7a498b4e268d764c6d24 (diff)
downloadlinux-f8fb3110635c91a375399450dc5a4a79a83b0414.tar.gz
linux-f8fb3110635c91a375399450dc5a4a79a83b0414.tar.bz2
linux-f8fb3110635c91a375399450dc5a4a79a83b0414.zip
RDMA/mlx5: Remove npages from mlx5_ib_cont_pages()
Most callers don't need this, and the few that do can get it as ib_umem_num_pages(umem). Link: https://lore.kernel.org/r/20201026131936.1335664-8-leon@kernel.org Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/mem.c')
-rw-r--r--drivers/infiniband/hw/mlx5/mem.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/mlx5/mem.c b/drivers/infiniband/hw/mlx5/mem.c
index 6d87f8c13ce0..7ae96b37bd6e 100644
--- a/drivers/infiniband/hw/mlx5/mem.c
+++ b/drivers/infiniband/hw/mlx5/mem.c
@@ -39,11 +39,10 @@
/* @umem: umem object to scan
* @addr: ib virtual address requested by the user
* @max_page_shift: high limit for page_shift - 0 means no limit
- * @count: number of PAGE_SIZE pages covered by umem
* @shift: page shift for the compound pages found in the region
*/
void mlx5_ib_cont_pages(struct ib_umem *umem, u64 addr,
- unsigned long max_page_shift, int *count, int *shift)
+ unsigned long max_page_shift, int *shift)
{
unsigned long tmp;
unsigned long m;
@@ -57,7 +56,6 @@ void mlx5_ib_cont_pages(struct ib_umem *umem, u64 addr,
struct ib_umem_odp *odp = to_ib_umem_odp(umem);
*shift = odp->page_shift;
- *count = ib_umem_num_pages(umem);
return;
}
@@ -91,7 +89,6 @@ void mlx5_ib_cont_pages(struct ib_umem *umem, u64 addr,
else
m = 0;
*shift = PAGE_SHIFT + m;
- *count = i;
}
/*