dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: fsl-edma: Remove redundant check in fsl_edma_free_chan_resources()
@ 2025-10-14  2:47 Zhen Ni
  2025-10-14 15:37 ` Frank Li
  0 siblings, 1 reply; 2+ messages in thread
From: Zhen Ni @ 2025-10-14  2:47 UTC (permalink / raw)
  To: Frank.Li, vkoul; +Cc: imx, dmaengine, Zhen Ni

clk_disable_unprepare() is safe to call with a NULL clk, the
FSL_EDMA_DRV_HAS_CHCLK check is reduntante. Clean up redundant checks.

Suggested-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Zhen Ni <zhen.ni@easystack.cn>
---
 drivers/dma/fsl-edma-common.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c
index 11655dcc4d6c..3007d5b7db55 100644
--- a/drivers/dma/fsl-edma-common.c
+++ b/drivers/dma/fsl-edma-common.c
@@ -884,8 +884,7 @@ void fsl_edma_free_chan_resources(struct dma_chan *chan)
 	fsl_chan->is_sw = false;
 	fsl_chan->srcid = 0;
 	fsl_chan->is_remote = false;
-	if (fsl_edma_drvflags(fsl_chan) & FSL_EDMA_DRV_HAS_CHCLK)
-		clk_disable_unprepare(fsl_chan->clk);
+	clk_disable_unprepare(fsl_chan->clk);
 }
 
 void fsl_edma_cleanup_vchan(struct dma_device *dmadev)
-- 
2.20.1


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

* Re: [PATCH] dmaengine: fsl-edma: Remove redundant check in fsl_edma_free_chan_resources()
  2025-10-14  2:47 [PATCH] dmaengine: fsl-edma: Remove redundant check in fsl_edma_free_chan_resources() Zhen Ni
@ 2025-10-14 15:37 ` Frank Li
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Li @ 2025-10-14 15:37 UTC (permalink / raw)
  To: Zhen Ni; +Cc: vkoul, imx, dmaengine

On Tue, Oct 14, 2025 at 10:47:30AM +0800, Zhen Ni wrote:
> clk_disable_unprepare() is safe to call with a NULL clk, the
> FSL_EDMA_DRV_HAS_CHCLK check is reduntante. Clean up redundant checks.
>
> Suggested-by: Frank Li <Frank.Li@nxp.com>
> Signed-off-by: Zhen Ni <zhen.ni@easystack.cn>
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.com>

>  drivers/dma/fsl-edma-common.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c
> index 11655dcc4d6c..3007d5b7db55 100644
> --- a/drivers/dma/fsl-edma-common.c
> +++ b/drivers/dma/fsl-edma-common.c
> @@ -884,8 +884,7 @@ void fsl_edma_free_chan_resources(struct dma_chan *chan)
>  	fsl_chan->is_sw = false;
>  	fsl_chan->srcid = 0;
>  	fsl_chan->is_remote = false;
> -	if (fsl_edma_drvflags(fsl_chan) & FSL_EDMA_DRV_HAS_CHCLK)
> -		clk_disable_unprepare(fsl_chan->clk);
> +	clk_disable_unprepare(fsl_chan->clk);
>  }
>
>  void fsl_edma_cleanup_vchan(struct dma_device *dmadev)
> --
> 2.20.1
>

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

end of thread, other threads:[~2025-10-14 15:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-14  2:47 [PATCH] dmaengine: fsl-edma: Remove redundant check in fsl_edma_free_chan_resources() Zhen Ni
2025-10-14 15:37 ` Frank Li

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