]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
RDMA/cma: Remove unused rdma_res_to_id
authorDr. David Alan Gilbert <linux@treblig.org>
Fri, 18 Apr 2025 16:58:48 +0000 (17:58 +0100)
committerLeon Romanovsky <leon@kernel.org>
Sun, 20 Apr 2025 15:21:46 +0000 (11:21 -0400)
The last use of rdma_res_to_id() was removed in 2020 by
commi t211cd9459fda ("RDMA: Add dedicated CM_ID resource tracker function")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://patch.msgid.link/20250418165848.241305-1-linux@treblig.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/cma.c
include/rdma/rdma_cm.h

index fedcdb56fb6b7c95819a43e6ac0cd3dad69e9815..cd7df623161d4ad9f2ca4326e60274d1b7e8ccdd 100644 (file)
@@ -144,19 +144,6 @@ struct iw_cm_id *rdma_iw_cm_id(struct rdma_cm_id *id)
 }
 EXPORT_SYMBOL(rdma_iw_cm_id);
 
-/**
- * rdma_res_to_id() - return the rdma_cm_id pointer for this restrack.
- * @res: rdma resource tracking entry pointer
- */
-struct rdma_cm_id *rdma_res_to_id(struct rdma_restrack_entry *res)
-{
-       struct rdma_id_private *id_priv =
-               container_of(res, struct rdma_id_private, res);
-
-       return &id_priv->id;
-}
-EXPORT_SYMBOL(rdma_res_to_id);
-
 static int cma_add_one(struct ib_device *device);
 static void cma_remove_one(struct ib_device *device, void *client_data);
 
index 8a8ab2f793abdf20e783a7a5d21f61cfd274b9b3..d1593ad47e280cac5adac204b7e18cccebb814e3 100644 (file)
@@ -388,6 +388,5 @@ void rdma_read_gids(struct rdma_cm_id *cm_id, union ib_gid *sgid,
                    union ib_gid *dgid);
 
 struct iw_cm_id *rdma_iw_cm_id(struct rdma_cm_id *cm_id);
-struct rdma_cm_id *rdma_res_to_id(struct rdma_restrack_entry *res);
 
 #endif /* RDMA_CM_H */