dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/4] dmaengine: mediatek: do not hold the spinlock for vchan_dma_desc_free_list
@ 2021-05-03 15:26 Guillaume Ranquet
  0 siblings, 0 replies; only message in thread
From: Guillaume Ranquet @ 2021-05-03 15:26 UTC (permalink / raw)
  Cc: Sean Wang, Vinod Koul, Dan Williams, Matthias Brugger, dmaengine,
	linux-arm-kernel, linux-mediatek, linux-kernel

As there is no need to hold the spinlock for dma_desc_free_list,
Move it oustide the spinlock section.

Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>

diff --git a/drivers/dma/mediatek/mtk-uart-apdma.c
b/drivers/dma/mediatek/mtk-uart-apdma.c
index 4711bec04b98..ba43708f2a93 100644
--- a/drivers/dma/mediatek/mtk-uart-apdma.c
+++ b/drivers/dma/mediatek/mtk-uart-apdma.c
@@ -431,8 +431,8 @@ static int mtk_uart_apdma_terminate_all(struct
dma_chan *chan)

 	spin_lock_irqsave(&c->vc.lock, flags);
 	vchan_get_all_descriptors(&c->vc, &head);
-	vchan_dma_desc_free_list(&c->vc, &head);
 	spin_unlock_irqrestore(&c->vc.lock, flags);
+	vchan_dma_desc_free_list(&c->vc, &head);

 	return 0;
 }
-- 
2.26.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-03 15:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-03 15:26 [PATCH 4/4] dmaengine: mediatek: do not hold the spinlock for vchan_dma_desc_free_list Guillaume Ranquet

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).