Commit 3cfcda2a authored by Clément Léger's avatar Clément Léger Committed by David S. Miller

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: default avatarkernel test robot <lkp@intel.com>
Fixes: 753a026c ("net: ocelot: add FDMA support")
Signed-off-by: default avatarClément Léger <clement.leger@bootlin.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b26980ab
...@@ -734,8 +734,8 @@ static void ocelot_fdma_free_tx_ring(struct ocelot *ocelot) ...@@ -734,8 +734,8 @@ static void ocelot_fdma_free_tx_ring(struct ocelot *ocelot)
while (idx != tx_ring->next_to_use) { while (idx != tx_ring->next_to_use) {
txb = &tx_ring->bufs[idx]; txb = &tx_ring->bufs[idx];
skb = txb->skb; skb = txb->skb;
dma_unmap_single(ocelot->dev, txb->dma_addr, skb->len, dma_unmap_single(ocelot->dev, dma_unmap_addr(txb, dma_addr),
DMA_TO_DEVICE); skb->len, DMA_TO_DEVICE);
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
idx = ocelot_fdma_idx_next(idx, OCELOT_FDMA_TX_RING_SIZE); idx = ocelot_fdma_idx_next(idx, OCELOT_FDMA_TX_RING_SIZE);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment