* [PATCH] net: am65-cpsw-nuss: remove unused variables
@ 2025-03-17 12:28 Sascha Hauer
0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2025-03-17 12:28 UTC (permalink / raw)
To: Barebox List
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-03-17 12:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-17 12:28 [PATCH] net: am65-cpsw-nuss: remove unused variables Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox