Memory returned by dma_alloc_coherent() should already be zeroed out, so there's no need to do this explicitly. Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx> --- drivers/net/rtl8169.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c index 4e9823d42..80997dc89 100644 --- a/drivers/net/rtl8169.c +++ b/drivers/net/rtl8169.c @@ -227,9 +227,6 @@ static void rtl8169_init_ring(struct rtl8169_priv *priv) dma_sync_single_for_device((unsigned long)priv->rx_buf, NUM_RX_DESC * PKT_BUF_SIZE, DMA_FROM_DEVICE); - memset((void *)priv->tx_desc, 0, NUM_TX_DESC * sizeof(struct bufdesc)); - memset((void *)priv->rx_desc, 0, NUM_RX_DESC * sizeof(struct bufdesc)); - for (i = 0; i < NUM_RX_DESC; i++) { if (i == (NUM_RX_DESC - 1)) priv->rx_desc[i].status = -- 2.21.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox