From: linux@treblig.org
To: bharat@chelsio.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"Dr. David Alan Gilbert" <linux@treblig.org>
Subject: [PATCH net-next 3/6] cxgb4: Remove unused cxgb4_get_srq_entry
Date: Sun, 13 Oct 2024 21:38:28 +0100 [thread overview]
Message-ID: <20241013203831.88051-4-linux@treblig.org> (raw)
In-Reply-To: <20241013203831.88051-1-linux@treblig.org>
From: "Dr. David Alan Gilbert" <linux@treblig.org>
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>
---
drivers/net/ethernet/chelsio/cxgb4/srq.c | 58 ------------------------
drivers/net/ethernet/chelsio/cxgb4/srq.h | 2 -
2 files changed, 60 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/srq.c b/drivers/net/ethernet/chelsio/cxgb4/srq.c
index 9a54302bb046..a77d6ac1ee8c 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/srq.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/srq.c
@@ -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)
{
diff --git a/drivers/net/ethernet/chelsio/cxgb4/srq.h b/drivers/net/ethernet/chelsio/cxgb4/srq.h
index ec85cf93865a..d9f04bd5ffa3 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/srq.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/srq.h
@@ -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 */
--
2.47.0
next prev parent reply other threads:[~2024-10-13 20:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-13 20:38 [PATCH net-next 0/6] cxgb4: Deadcode removal linux
2024-10-13 20:38 ` [PATCH net-next 1/6] cxgb4: Remove unused cxgb4_alloc/free_encap_mac_filt linux
2024-10-14 3:35 ` Kalesh Anakkur Purayil
2024-10-13 20:38 ` [PATCH net-next 2/6] cxgb4: Remove unused cxgb4_alloc/free_raw_mac_filt linux
2024-10-14 3:37 ` Kalesh Anakkur Purayil
2024-10-13 20:38 ` linux [this message]
2024-10-14 3:33 ` [PATCH net-next 3/6] cxgb4: Remove unused cxgb4_get_srq_entry Kalesh Anakkur Purayil
2024-10-13 20:38 ` [PATCH net-next 4/6] cxgb4: Remove unused cxgb4_scsi_init linux
2024-10-14 3:34 ` Kalesh Anakkur Purayil
2024-10-13 20:38 ` [PATCH net-next 5/6] cxgb4: Remove unused cxgb4_l2t_alloc_switching linux
2024-10-14 3:36 ` Kalesh Anakkur Purayil
2024-10-13 20:38 ` [PATCH net-next 6/6] cxgb4: Remove unused t4_free_ofld_rxqs linux
2024-10-14 3:31 ` Kalesh Anakkur Purayil
2024-10-14 11:21 ` Dr. David Alan Gilbert
2024-10-16 0:00 ` [PATCH net-next 0/6] cxgb4: Deadcode removal patchwork-bot+netdevbpf
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=20241013203831.88051-4-linux@treblig.org \
--to=linux@treblig.org \
--cc=bharat@chelsio.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).