[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20251128152947.304976-2-amin.gattout@gmail.com>
Date: Fri, 28 Nov 2025 16:29:48 +0100
From: Amin GATTOUT <amin.gattout@...il.com>
To: vkoul@...nel.org,
thomasandreatta2000@...il.com
Cc: dmaengine@...r.kernel.org,
linux-kernel@...r.kernel.org,
Amin GATTOUT <amin.gattout@...il.com>
Subject: [PATCH] shdmac: Remove misleading TODO comment in dmae_set_chcr
The comment suggested that the dmae_is_busy() check in dmae_set_chcr()
is superfluous and could be removed. However, this check serves as an
important safety net to prevent configuration of a DMA channel while
it is active. Keeping it helps ensure transfer integrity and avoids
unexpected hardware behavior in edge cases.
Signed-off-by: Amin GATTOUT <amin.gattout@...il.com>
---
drivers/dma/sh/shdmac.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/dma/sh/shdmac.c b/drivers/dma/sh/shdmac.c
index 603e15102e45..d0e0437ad916 100644
--- a/drivers/dma/sh/shdmac.c
+++ b/drivers/dma/sh/shdmac.c
@@ -243,7 +243,6 @@ static void dmae_init(struct sh_dmae_chan *sh_chan)
static int dmae_set_chcr(struct sh_dmae_chan *sh_chan, u32 val)
{
- /* If DMA is active, cannot set CHCR. TODO: remove this superfluous check */
if (dmae_is_busy(sh_chan))
return -EBUSY;
--
2.43.0
Powered by blists - more mailing lists