From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
Yishai Hadas <yishaih@nvidia.com>,
Chiara Meiohas <cmeiohas@nvidia.com>,
Michal Kalderon <mkalderon@marvell.com>,
Selvin Xavier <selvin.xavier@broadcom.com>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
Parav Pandit <parav@nvidia.com>
Subject: [PATCH rdma-next 2/6] RDMA/core: Avoid exporting module local functions and remove not-used ones
Date: Sun, 4 Jan 2026 15:51:34 +0200 [thread overview]
Message-ID: <20260104-ib-core-misc-v1-2-00367f77f3a8@nvidia.com> (raw)
In-Reply-To: <20260104-ib-core-misc-v1-0-00367f77f3a8@nvidia.com>
From: Parav Pandit <parav@nvidia.com>
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>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
drivers/infiniband/core/device.c | 30 ------------------------------
include/rdma/ib_verbs.h | 2 --
2 files changed, 32 deletions(-)
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 13e8a1714bbd..0b0efa9d93aa 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -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;
@@ -2875,7 +2847,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)
{
@@ -2894,7 +2865,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)
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 6aad66bc5dd7..e92bf2e44fd8 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -4545,8 +4545,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);
--
2.52.0
next prev parent reply other threads:[~2026-01-04 13:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-04 13:51 [PATCH rdma-next 0/6] Batch of unrelated cleanups in IB Leon Romanovsky
2026-01-04 13:51 ` [PATCH rdma-next 1/6] RDMA/umem: Remove redundant DMABUF ops check Leon Romanovsky
2026-01-05 3:29 ` Kalesh Anakkur Purayil
2026-01-04 13:51 ` Leon Romanovsky [this message]
2026-01-05 3:45 ` [PATCH rdma-next 2/6] RDMA/core: Avoid exporting module local functions and remove not-used ones Kalesh Anakkur Purayil
2026-01-05 5:01 ` Zhu Yanjun
2026-01-04 13:51 ` [PATCH rdma-next 3/6] RDMA/mlx5: Fix ucaps init error flow Leon Romanovsky
2026-01-05 3:37 ` Kalesh Anakkur Purayil
2026-01-04 13:51 ` [PATCH rdma-next 4/6] RDMA/mlx5: Avoid direct access to DMA device pointer Leon Romanovsky
2026-01-05 3:45 ` Kalesh Anakkur Purayil
2026-01-04 13:51 ` [PATCH rdma-next 5/6] RDMA/qedr: Remove unused defines Leon Romanovsky
2026-01-05 3:34 ` Kalesh Anakkur Purayil
2026-01-04 13:51 ` [PATCH rdma-next 6/6] RDMA/ocrdma: Remove unused OCRDMA_UVERBS definition Leon Romanovsky
2026-01-05 3:41 ` Kalesh Anakkur Purayil
2026-01-05 9:07 ` [PATCH rdma-next 0/6] Batch of unrelated cleanups in IB Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260104-ib-core-misc-v1-2-00367f77f3a8@nvidia.com \
--to=leon@kernel.org \
--cc=cmeiohas@nvidia.com \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mkalderon@marvell.com \
--cc=parav@nvidia.com \
--cc=selvin.xavier@broadcom.com \
--cc=yishaih@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®