]> www.infradead.org Git - users/dwmw2/linux.git/commit
dmaengine: altera-msgdma: cleanup after completing all descriptors
authorOlivier Dautricourt <olivierdautricourt@gmail.com>
Sat, 8 Jun 2024 21:31:47 +0000 (23:31 +0200)
committerVinod Koul <vkoul@kernel.org>
Tue, 11 Jun 2024 16:20:55 +0000 (21:50 +0530)
commitd3ddfab0969b19a7dee3753010bb3ea94a0cccd1
tree3a6078c2c86a9b6efaab32a14a19772a404b4e2f
parent261d3a85d959841821ca0d69f9d7b0d4087661c4
dmaengine: altera-msgdma: cleanup after completing all descriptors

msgdma_chan_desc_cleanup iterates the done list for each completed
descriptor while we need to do it once after all descriptors are
completed.

This fixes a Sparse warning because we first take the lock in
msgdma_tasklet.
- Move locking to msgdma_chan_desc_cleanup.
- Move call to msgdma_chan_desc_cleanup outside of the critical section of
msgdma_tasklet.

Inspired by: commit 16ed0ef3e931 ("dmaengine: zynqmp_dma: cleanup after
                                   completing all descriptors")

Signed-off-by: Olivier Dautricourt <olivierdautricourt@gmail.com>
Tested-by: Olivier Dautricourt <olivierdautricourt@gmail.com>
Suggested-by: Eric Schwarz <eas@sw-optimization.com>
Link: https://lore.kernel.org/r/20240608213216.25087-2-olivierdautricourt@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/altera-msgdma.c