Skip to content

Commit 3cfcda2

Browse files
clementlegerdavem330
authored andcommitted
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 <[email protected]> Fixes: 753a026 ("net: ocelot: add FDMA support") Signed-off-by: Clément Léger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b26980a commit 3cfcda2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/mscc/ocelot_fdma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,8 +734,8 @@ static void ocelot_fdma_free_tx_ring(struct ocelot *ocelot)
734734
while (idx != tx_ring->next_to_use) {
735735
txb = &tx_ring->bufs[idx];
736736
skb = txb->skb;
737-
dma_unmap_single(ocelot->dev, txb->dma_addr, skb->len,
738-
DMA_TO_DEVICE);
737+
dma_unmap_single(ocelot->dev, dma_unmap_addr(txb, dma_addr),
738+
skb->len, DMA_TO_DEVICE);
739739
dev_kfree_skb_any(skb);
740740
idx = ocelot_fdma_idx_next(idx, OCELOT_FDMA_TX_RING_SIZE);
741741
}

0 commit comments

Comments
 (0)