Skip to contentSkip to conversation

RDMA/cma: Remove unused rdma_res_to_id

PATCH Applied [email protected] 2 participants 2 messages Apr 18, 2025 – Apr 20, 2025 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/cma: Remove unused rdma_res_to_id

From: "Dr. David Alan Gilbert" <[email protected]>

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.

---
 drivers/infiniband/core/cma.c | 13 -------------
 include/rdma/rdma_cm.h        |  1 -
 2 files changed, 14 deletions(-)
drivers/infiniband/core/cma.c +0 -13
index ab31eefa916b..e6cc289fd859 100644
@@ -146,19 +146,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);
 
include/rdma/rdma_cm.h +0 -1
index 8a8ab2f793ab..d1593ad47e28 100644
@@ -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 */
Signature · 1 line
2.49.0