aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2020-08-25 15:17:08 -0300
committerJason Gunthorpe <jgg@nvidia.com>2020-08-31 12:15:10 -0300
commit61690d01db32eb1f94adc9ac2b8bb741d34e4671 (patch)
tree8525bf5efd5513acf1c49ce0a39e521120914ddf /include
parentRDMA/core: Trigger a WARN_ON if the driver causes uobjects to become leaked (diff)
downloadlinux-dev-61690d01db32eb1f94adc9ac2b8bb741d34e4671.tar.xz
linux-dev-61690d01db32eb1f94adc9ac2b8bb741d34e4671.zip
RDMA/umem: Fix signature of stub ib_umem_find_best_pgsz()
The original function returns unsigned long and 0 on failure. Fixes: 4a35339958f1 ("RDMA/umem: Add API to find best driver supported page size in an MR") Link: https://lore.kernel.org/r/0-v1-982a13cc5c6d+501ae-fix_best_pgsz_stub_jgg@nvidia.com Reviewed-by: Gal Pressman <galpress@amazon.com> Acked-by: Shiraz Saleem <shiraz.saleem@intel.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/rdma/ib_umem.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/rdma/ib_umem.h b/include/rdma/ib_umem.h
index 71f573a418bf..07a764eb692e 100644
--- a/include/rdma/ib_umem.h
+++ b/include/rdma/ib_umem.h
@@ -68,10 +68,11 @@ static inline int ib_umem_copy_from(void *dst, struct ib_umem *umem, size_t offs
size_t length) {
return -EINVAL;
}
-static inline int ib_umem_find_best_pgsz(struct ib_umem *umem,
- unsigned long pgsz_bitmap,
- unsigned long virt) {
- return -EINVAL;
+static inline unsigned long ib_umem_find_best_pgsz(struct ib_umem *umem,
+ unsigned long pgsz_bitmap,
+ unsigned long virt)
+{
+ return 0;
}
#endif /* CONFIG_INFINIBAND_USER_MEM */