]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
RDMA/umem: Route ib_umem_get_va() through ib_umem_get_attr_or_va()
authorJiri Pirko <jiri@nvidia.com>
Fri, 29 May 2026 13:43:00 +0000 (15:43 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 29 May 2026 23:19:57 +0000 (20:19 -0300)
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>
drivers/infiniband/core/umem.c
include/rdma/ib_umem.h

index 7d2256583bc797839d91b512031c94b1e711b4a2..680bdbbc59848a929bef1ae1c07fb10cb9fdd8b2 100644 (file)
@@ -438,21 +438,6 @@ ib_umem_get_from_attrs_or_va(struct ib_device *device,
        return ib_umem_get_desc_check(device, &desc, size, access);
 }
 
-/**
- * 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.
index 0f373679ea817b7cec4998bd7c2fb4986e4fb05f..908eafa52840e0d2f0117452605e38205416356c 100644 (file)
@@ -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);