linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: ocelot: use dma_unmap_addr to get tx buffer dma_addr
@ 2021-12-13  8:26 Clément Léger
  2021-12-13 15:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Clément Léger @ 2021-12-13  8:26 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, Rob Herring, Vladimir Oltean,
	Claudiu Manoil, Alexandre Belloni, UNGLinuxDriver, Andrew Lunn,
	Florian Fainelli, Russell King
  Cc: Clément Léger, netdev, devicetree, linux-kernel,
	Thomas Petazzoni, Denis Kirjanov, Julian Wiedmann,
	kernel test robot

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

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 753a026cfec1 ("net: ocelot: add FDMA support")
Signed-off-by: Clément Léger <clement.leger@bootlin.com>
---
 drivers/net/ethernet/mscc/ocelot_fdma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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);
 	}
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: ocelot: use dma_unmap_addr to get tx buffer dma_addr
  2021-12-13  8:26 [PATCH net-next] net: ocelot: use dma_unmap_addr to get tx buffer dma_addr Clément Léger
@ 2021-12-13 15:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-12-13 15:00 UTC (permalink / raw)
  To: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2VyIDxjbGVtZW50LmxlZ2VyQGJvb3RsaW4uY29tPg==?=
  Cc: davem, kuba, robh+dt, vladimir.oltean, claudiu.manoil,
	alexandre.belloni, UNGLinuxDriver, andrew, f.fainelli, linux,
	netdev, devicetree, linux-kernel, thomas.petazzoni, dkirjanov,
	jwi, lkp

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

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.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 753a026cfec1 ("net: ocelot: add FDMA support")
> Signed-off-by: Clément Léger <clement.leger@bootlin.com>
> 
> [...]

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-13 15:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13  8:26 [PATCH net-next] net: ocelot: use dma_unmap_addr to get tx buffer dma_addr Clément Léger
2021-12-13 15:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).