mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] net: am65-cpsw-nuss: remove unused variables
Date: Mon, 17 Mar 2025 13:28:31 +0100	[thread overview]
Message-ID: <20250317122831.3207605-1-s.hauer@pengutronix.de> (raw)

In struct am65_cpsw_common the fields rx_next and rx_pend are set but
not used. Remove them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/net/am65-cpsw-nuss.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/net/am65-cpsw-nuss.c b/drivers/net/am65-cpsw-nuss.c
index 6b9432e2d4..1b90669fec 100644
--- a/drivers/net/am65-cpsw-nuss.c
+++ b/drivers/net/am65-cpsw-nuss.c
@@ -118,8 +118,6 @@ struct am65_cpsw_common {
 
 	struct dma		*dma_tx;
 	struct dma		*dma_rx;
-	u32			rx_next;
-	u32			rx_pend;
 	int			started;
 };
 
@@ -285,8 +283,6 @@ static int am65_cpsw_common_start(struct am65_cpsw_common *common)
 		goto err_off_pwrdm;
 	}
 
-	common->rx_next = 0;
-	common->rx_pend = 0;
 	common->dma_tx = dma_get_by_name(common->dev, "tx0");
 	if (IS_ERR(common->dma_tx)) {
 		ret = PTR_ERR(common->dma_tx);
@@ -465,7 +461,7 @@ static void am65_cpsw_recv(struct eth_device *edev)
 	struct ti_udma_drv_packet_data packet_data;
 	dma_addr_t pkt;
 	int ret;
-	u32 num, port_id;
+	u32 port_id;
 
 	if (!common->started)
 		return;
@@ -499,15 +495,11 @@ static void am65_cpsw_recv(struct eth_device *edev)
 
 	net_receive(&port->edev, (void *)pkt, ret);
 out:
-	num = common->rx_next % UDMA_RX_DESC_NUM;
-
 	dma_sync_single_for_device(common->dev, pkt, ret, DMA_FROM_DEVICE);
 
 	ret = dma_prepare_rcv_buf(common->dma_rx, pkt, PKTSIZE);
 	if (ret)
 		dev_err(common->dev, "RX dma free_pkt failed %d\n", ret);
-
-	common->rx_next++;
 }
 
 static void am65_cpsw_common_stop(struct am65_cpsw_common *common)
-- 
2.39.5




                 reply	other threads:[~2025-03-17 12:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250317122831.3207605-1-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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