]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
RDMA/core: Avoid exporting module local functions and remove not-used ones
authorParav Pandit <parav@nvidia.com>
Sun, 4 Jan 2026 13:51:34 +0000 (15:51 +0200)
committerLeon Romanovsky <leon@kernel.org>
Mon, 5 Jan 2026 09:02:29 +0000 (04:02 -0500)
Some of the functions are local to the module and some are not used
starting from commit 36783dec8d79 ("RDMA/rxe: Delete deprecated module
parameters interface"). Delete and avoid exporting them.

Signed-off-by: Parav Pandit <parav@nvidia.com>
Link: https://patch.msgid.link/20260104-ib-core-misc-v1-2-00367f77f3a8@nvidia.com
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/device.c
include/rdma/ib_verbs.h

index 04edc57592aae37eaea12102dd850e0effdf0cc0..4e09f6e0995eef0a57a80853c5ba2072bb20cbff 100644 (file)
@@ -361,34 +361,6 @@ static struct ib_device *__ib_device_get_by_name(const char *name)
        return NULL;
 }
 
-/**
- * ib_device_get_by_name - Find an IB device by name
- * @name: The name to look for
- * @driver_id: The driver ID that must match (RDMA_DRIVER_UNKNOWN matches all)
- *
- * Find and hold an ib_device by its name. The caller must call
- * ib_device_put() on the returned pointer.
- */
-struct ib_device *ib_device_get_by_name(const char *name,
-                                       enum rdma_driver_id driver_id)
-{
-       struct ib_device *device;
-
-       down_read(&devices_rwsem);
-       device = __ib_device_get_by_name(name);
-       if (device && driver_id != RDMA_DRIVER_UNKNOWN &&
-           device->ops.driver_id != driver_id)
-               device = NULL;
-
-       if (device) {
-               if (!ib_device_try_get(device))
-                       device = NULL;
-       }
-       up_read(&devices_rwsem);
-       return device;
-}
-EXPORT_SYMBOL(ib_device_get_by_name);
-
 static int rename_compat_devs(struct ib_device *device)
 {
        struct ib_core_device *cdev;
@@ -2876,7 +2848,6 @@ int ib_add_sub_device(struct ib_device *parent,
 
        return ret;
 }
-EXPORT_SYMBOL(ib_add_sub_device);
 
 int ib_del_sub_device_and_put(struct ib_device *sub)
 {
@@ -2895,7 +2866,6 @@ int ib_del_sub_device_and_put(struct ib_device *sub)
 
        return 0;
 }
-EXPORT_SYMBOL(ib_del_sub_device_and_put);
 
 #ifdef CONFIG_INFINIBAND_VIRT_DMA
 int ib_dma_virt_map_sg(struct ib_device *dev, struct scatterlist *sg, int nents)
index a4786395328a423e61f9c6255b6437043e34f9c1..6c372a37c48244f0c62a85bfa24c4940d969cfd7 100644 (file)
@@ -4562,8 +4562,6 @@ static inline bool ib_device_try_get(struct ib_device *dev)
 void ib_device_put(struct ib_device *device);
 struct ib_device *ib_device_get_by_netdev(struct net_device *ndev,
                                          enum rdma_driver_id driver_id);
-struct ib_device *ib_device_get_by_name(const char *name,
-                                       enum rdma_driver_id driver_id);
 struct net_device *ib_get_net_dev_by_params(struct ib_device *dev, u32 port,
                                            u16 pkey, const union ib_gid *gid,
                                            const struct sockaddr *addr);