diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2024-04-23 19:36:25 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2024-04-29 15:47:37 +0200 |
commit | 0e5b0c7c11bca806750b54d4da5417317213555b (patch) | |
tree | b24836ddc436c9f31fa4f39c2d1434de9b607196 | |
parent | bfad3689dfd0024146182abff3ba35efdc559ba6 (diff) | |
download | barebox-0e5b0c7c11bc.tar.gz barebox-0e5b0c7c11bc.tar.xz |
net: fsl-fman: remove superfluous zeroing of new dma_alloc_coherent buf
dma_alloc_coherent() already takes care to zero the memory, so there's
no need to zero it explicitly.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20240423173625.2299942-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/net/fsl-fman.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/net/fsl-fman.c b/drivers/net/fsl-fman.c index bdb2359815..5528ecccc9 100644 --- a/drivers/net/fsl-fman.c +++ b/drivers/net/fsl-fman.c @@ -615,9 +615,6 @@ static int fm_eth_rx_port_parameter_init(struct fm_eth *fm_eth) if (!rx_bd_ring_base) return -ENOMEM; - memset(rx_bd_ring_base, 0, sizeof(struct fm_port_bd) - * RX_BD_RING_SIZE); - /* alloc Rx buffer from main memory */ rx_buf_pool = dma_zalloc(MAX_RXBUF_LEN * RX_BD_RING_SIZE); @@ -696,8 +693,6 @@ static int fm_eth_tx_port_parameter_init(struct fm_eth *fm_eth) if (!tx_bd_ring_base) return -ENOMEM; - memset(tx_bd_ring_base, 0, sizeof(struct fm_port_bd) - * TX_BD_RING_SIZE); /* save it to fm_eth */ fm_eth->tx_bd_ring = tx_bd_ring_base; fm_eth->cur_txbd_idx = 0; |