Skip to contentSkip to conversation

net: ocelot: use dma_unmap_addr to get tx buffer dma_addr

PATCH Applied Clément Léger 2 participants 2 messages Dec 13, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Fixes 753a026cfec1 ("net: ocelot: add FDMA support")
---
 drivers/net/ethernet/mscc/ocelot_fdma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/mscc/ocelot_fdma.c +2 -2
index 350a0b52f021..dffa597bffe6 100644
@@ -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);
 	}
Signature · 1 line
2.34.1
#1 lore raw
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Quoted 8 lines · On Mon, 13 Dec 2021 09:26:51 +0100 you wrote:

dma_addr was declared using DEFINE_DMA_UNMAP_ADDR() which requires to use dma_unmap_addr() to access it.

Fixes 753a026cfec1 ("net: ocelot: add FDMA support")

[...]

Here is the summary with links:
- [net-next] net: ocelot: use dma_unmap_addr to get tx buffer dma_addr

    https://git.kernel.org/netdev/net-next/c/3cfcda2aee94

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html