From: Clément Léger Date: Mon, 13 Dec 2021 08:26:51 +0000 (+0100) Subject: net: ocelot: use dma_unmap_addr to get tx buffer dma_addr X-Git-Tag: howlett/maple/20220722_2~1498^2~206 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3cfcda2aee9446b30d1e0fefc11eeffe95fa6430;p=users%2Fjedix%2Flinux-maple.git net: ocelot: use dma_unmap_addr to get tx buffer dma_addr dma_addr was declared using DEFINE_DMA_UNMAP_ADDR() which requires to use dma_unmap_addr() to access it. Reported-by: kernel test robot Fixes: 753a026cfec1 ("net: ocelot: add FDMA support") Signed-off-by: Clément Léger Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mscc/ocelot_fdma.c b/drivers/net/ethernet/mscc/ocelot_fdma.c index 350a0b52f021..dffa597bffe6 100644 --- a/drivers/net/ethernet/mscc/ocelot_fdma.c +++ b/drivers/net/ethernet/mscc/ocelot_fdma.c @@ -734,8 +734,8 @@ static void ocelot_fdma_free_tx_ring(struct ocelot *ocelot) while (idx != tx_ring->next_to_use) { txb = &tx_ring->bufs[idx]; skb = txb->skb; - dma_unmap_single(ocelot->dev, txb->dma_addr, skb->len, - DMA_TO_DEVICE); + dma_unmap_single(ocelot->dev, dma_unmap_addr(txb, dma_addr), + skb->len, DMA_TO_DEVICE); dev_kfree_skb_any(skb); idx = ocelot_fdma_idx_next(idx, OCELOT_FDMA_TX_RING_SIZE); }