dmaengine: at_xdmac: Print debug message after realeasing the lock
authorTudor Ambarus <tudor.ambarus@microchip.com>
Wed, 15 Dec 2021 11:01:06 +0000 (13:01 +0200)
committerVinod Koul <vkoul@kernel.org>
Wed, 5 Jan 2022 10:20:03 +0000 (15:50 +0530)
It is desirable to do the prints without the lock held if possible, so
move the print after the lock is released.

Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20211215110115.191749-4-tudor.ambarus@microchip.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/at_xdmac.c

index c3d3e127023610e7ef574196a7ce0208d6aec7b7..7d3560acedbb9260d5ca41174c68bd2b42809297 100644 (file)
@@ -473,10 +473,12 @@ static dma_cookie_t at_xdmac_tx_submit(struct dma_async_tx_descriptor *tx)
        spin_lock_irqsave(&atchan->lock, irqflags);
        cookie = dma_cookie_assign(tx);
 
-       dev_vdbg(chan2dev(tx->chan), "%s: atchan 0x%p, add desc 0x%p to xfers_list\n",
-                __func__, atchan, desc);
        list_add_tail(&desc->xfer_node, &atchan->xfers_list);
        spin_unlock_irqrestore(&atchan->lock, irqflags);
+
+       dev_vdbg(chan2dev(tx->chan), "%s: atchan 0x%p, add desc 0x%p to xfers_list\n",
+                __func__, atchan, desc);
+
        return cookie;
 }