On Mon, 16 May 2022 18:06:32 +0200 Lorenzo Bianconi wrote: > static int mtk_tx_alloc(struct mtk_eth *eth) > { > + const struct mtk_soc_data *soc = eth->soc; > struct mtk_tx_ring *ring = ð->tx_ring; > - int i, sz = sizeof(*ring->dma); The change would be smaller if you left sz in place. I guess you have a reason not to? > + struct mtk_tx_dma *txd; > + int i; > > ring->buf = kcalloc(MTK_DMA_SIZE, sizeof(*ring->buf), > GFP_KERNEL); > if (!ring->buf) > goto no_tx_mem; > > - ring->dma = dma_alloc_coherent(eth->dma_dev, MTK_DMA_SIZE * sz, > + ring->dma = dma_alloc_coherent(eth->dma_dev, > + MTK_DMA_SIZE * soc->txrx.txd_size, > &ring->phys, GFP_ATOMIC); Another GFP nugget.