diff options
| author | Jiri Pirko <jiri@nvidia.com> | 2026-05-29 15:43:00 +0200 |
|---|---|---|
| committer | Jason Gunthorpe <jgg@nvidia.com> | 2026-05-29 20:19:57 -0300 |
| commit | df67f15c447475b81f77de2eaf22732bc11d6bae (patch) | |
| tree | 2192d33a638d1e7f79dcc402768385fec4f165fd | |
| parent | 3cfdff484d84f04716ae56063a8dac3773bd3f29 (diff) | |
RDMA/umem: Route ib_umem_get_va() through ib_umem_get_attr_or_va()
ib_umem_get_va() is now redundant: ib_umem_get_attr_or_va() with
attrs=NULL and attr_id=0 covers the exact same path. Make it a static
inline wrapper instead of a separately exported symbol.
Link: https://patch.msgid.link/r/20260529134312.2836341-5-jiri@resnulli.us
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
| -rw-r--r-- | drivers/infiniband/core/umem.c | 15 | ||||
| -rw-r--r-- | include/rdma/ib_umem.h | 9 |
2 files changed, 7 insertions, 17 deletions
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c index 7d2256583bc7..680bdbbc5984 100644 --- a/drivers/infiniband/core/umem.c +++ b/drivers/infiniband/core/umem.c @@ -439,21 +439,6 @@ ib_umem_get_from_attrs_or_va(struct ib_device *device, } /** - * ib_umem_get_va - Pin and DMA map userspace memory. - * - * @device: IB device to connect UMEM - * @addr: userspace virtual address to start at - * @size: length of region to pin - * @access: IB_ACCESS_xxx flags for memory being pinned - */ -struct ib_umem *ib_umem_get_va(struct ib_device *device, unsigned long addr, - size_t size, int access) -{ - return __ib_umem_get_va(device, addr, size, access); -} -EXPORT_SYMBOL(ib_umem_get_va); - -/** * ib_umem_get_attr - Pin a umem from a per-command UMEM attribute. * @device: IB device. * @attrs: uverbs attribute bundle (may be NULL). diff --git a/include/rdma/ib_umem.h b/include/rdma/ib_umem.h index 0f373679ea81..908eafa52840 100644 --- a/include/rdma/ib_umem.h +++ b/include/rdma/ib_umem.h @@ -83,8 +83,6 @@ struct uverbs_attr_bundle; struct ib_umem *ib_umem_get_desc(struct ib_device *device, const struct ib_uverbs_buffer_desc *desc, int access); -struct ib_umem *ib_umem_get_va(struct ib_device *device, unsigned long addr, - size_t size, int access); struct ib_umem *ib_umem_get_attr(struct ib_device *device, const struct uverbs_attr_bundle *attrs, u16 attr_id, size_t size, int access); @@ -93,6 +91,13 @@ struct ib_umem *ib_umem_get_attr_or_va(struct ib_device *device, u16 attr_id, u64 addr, size_t size, int access); +static inline struct ib_umem *ib_umem_get_va(struct ib_device *device, + unsigned long addr, size_t size, + int access) +{ + return ib_umem_get_attr_or_va(device, NULL, 0, addr, size, access); +} + void ib_umem_release(struct ib_umem *umem); int ib_umem_copy_from(void *dst, struct ib_umem *umem, size_t offset, size_t length); |
