]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
cxgb4: Remove unused cxgb4_get_srq_entry
authorDr. David Alan Gilbert <linux@treblig.org>
Sun, 13 Oct 2024 20:38:28 +0000 (21:38 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 15 Oct 2024 23:46:27 +0000 (16:46 -0700)
cxgb4_get_srq_entry() has been unused since 2018's commit
e47094751ddc ("cxgb4: Add support to initialise/read SRQ entries")
which added it.

Remove it.

Note: I'm a bit suspicious whether any of the srq code in there
actually does anything useful;  without this get I can't see anything
that reads the data, so perhaps the whole thing should go?
But that however would remove one of the opcode handlers, and I have
no way to test that.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Link: https://patch.msgid.link/20241013203831.88051-4-linux@treblig.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/chelsio/cxgb4/srq.c
drivers/net/ethernet/chelsio/cxgb4/srq.h

index 9a54302bb046dca3682162d5d4e3a271aa0a17f4..a77d6ac1ee8c3fcf520649ca0f98f76fbe1aca06 100644 (file)
@@ -51,64 +51,6 @@ struct srq_data *t4_init_srq(int srq_size)
        return s;
 }
 
-/* cxgb4_get_srq_entry: read the SRQ table entry
- * @dev: Pointer to the net_device
- * @idx: Index to the srq
- * @entryp: pointer to the srq entry
- *
- * Sends CPL_SRQ_TABLE_REQ message for the given index.
- * Contents will be returned in CPL_SRQ_TABLE_RPL message.
- *
- * Returns zero if the read is successful, else a error
- * number will be returned. Caller should not use the srq
- * entry if the return value is non-zero.
- *
- *
- */
-int cxgb4_get_srq_entry(struct net_device *dev,
-                       int srq_idx, struct srq_entry *entryp)
-{
-       struct cpl_srq_table_req *req;
-       struct adapter *adap;
-       struct sk_buff *skb;
-       struct srq_data *s;
-       int rc = -ENODEV;
-
-       adap = netdev2adap(dev);
-       s = adap->srq;
-
-       if (!(adap->flags & CXGB4_FULL_INIT_DONE) || !s)
-               goto out;
-
-       skb = alloc_skb(sizeof(*req), GFP_KERNEL);
-       if (!skb)
-               return -ENOMEM;
-       req = (struct cpl_srq_table_req *)
-               __skb_put_zero(skb, sizeof(*req));
-       INIT_TP_WR(req, 0);
-       OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SRQ_TABLE_REQ,
-                                             TID_TID_V(srq_idx) |
-                               TID_QID_V(adap->sge.fw_evtq.abs_id)));
-       req->idx = srq_idx;
-
-       mutex_lock(&s->lock);
-
-       s->entryp = entryp;
-       t4_mgmt_tx(adap, skb);
-
-       rc = wait_for_completion_timeout(&s->comp, SRQ_WAIT_TO);
-       if (rc)
-               rc = 0;
-       else /* !rc means we timed out */
-               rc = -ETIMEDOUT;
-
-       WARN_ON_ONCE(entryp->idx != srq_idx);
-       mutex_unlock(&s->lock);
-out:
-       return rc;
-}
-EXPORT_SYMBOL(cxgb4_get_srq_entry);
-
 void do_srq_table_rpl(struct adapter *adap,
                      const struct cpl_srq_table_rpl *rpl)
 {
index ec85cf93865a804132235086129994e0b52fbbce..d9f04bd5ffa3384288ee3a100b0ee51b6c823d14 100644 (file)
@@ -58,8 +58,6 @@ struct srq_data {
 };
 
 struct srq_data *t4_init_srq(int srq_size);
-int cxgb4_get_srq_entry(struct net_device *dev,
-                       int srq_idx, struct srq_entry *entryp);
 void do_srq_table_rpl(struct adapter *adap,
                      const struct cpl_srq_table_rpl *rpl);
 #endif  /* __CXGB4_SRQ_H */