Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: joy.zou@oss.nxp.com
Cc: imx@lists.linux.dev, vkoul@kernel.org, Frank.Li@kernel.org,
	dmaengine@vger.kernel.org
Subject: Re: [PATCH v6 1/5] dmaengine: fsl-edma: use devm_clk_get_optional() for channel clock
Date: Wed, 01 Jul 2026 09:38:46 +0000	[thread overview]
Message-ID: <20260701093847.17A541F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260701-b4-edma-runtime-opt-v6-1-354ff4229c00@oss.nxp.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch introduces a compilation failure by calling an undefined function `devm_clk_prepare_enable()`.
--

commit 36cfeebd16ae2d241bf40213a5b9272983d736d3
Author: Joy Zou <joy.zou@nxp.com>

dmaengine: fsl-edma: use devm_clk_get_optional() for channel clock
    
This commit replaces devm_clk_get_enabled() with devm_clk_get_optional()
and removes the FSL_EDMA_DRV_HAS_CHCLK flag for channel clocks. It prepares
the driver for adding channel runtime PM support.

> diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c
> index 36155ab1602a9..1e864cd4c784e 100644
> --- a/drivers/dma/fsl-edma-main.c
> +++ b/drivers/dma/fsl-edma-main.c

[ ... ]

> @@ -808,22 +807,19 @@ static int fsl_edma_probe(struct platform_device *pdev)
>  		fsl_chan->tcd = fsl_edma->membase
>  				+ i * drvdata->chreg_space_sz + drvdata->chreg_off + len;
>  		fsl_chan->mux_addr = fsl_edma->membase + drvdata->mux_off + i * drvdata->mux_skip;
> -
> -		if (drvdata->flags & FSL_EDMA_DRV_HAS_CHCLK) {
> -			snprintf(clk_name, sizeof(clk_name), "ch%02d", i);
> -			fsl_chan->clk = devm_clk_get_enabled(&pdev->dev,
> -							     (const char *)clk_name);
> -
> -			if (IS_ERR(fsl_chan->clk))
> -				return PTR_ERR(fsl_chan->clk);
> -		}
> +		snprintf(clk_name, sizeof(clk_name), "ch%02d", i);
> +		fsl_chan->clk = devm_clk_get_optional(&pdev->dev, (const char *)clk_name);
> +		if (IS_ERR(fsl_chan->clk))
> +			return PTR_ERR(fsl_chan->clk);
> +		ret = devm_clk_prepare_enable(&pdev->dev, fsl_chan->clk);
> +		if (ret)
> +			return dev_err_probe(&pdev->dev, ret, "Failed to enable clock\n");

[Severity: Low]
Will this introduce a build failure? The function devm_clk_prepare_enable()
does not appear to be defined in the Linux kernel Common Clock Framework.

I see this compilation regression was resolved later in the patch series by
commit a5800ff547600d938eb443a21684d6291b4658d1 ("dmaengine: fsl-edma: add
runtime suspend/resume support"), but could it break git bisect if this
commit is tested independently?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260701-b4-edma-runtime-opt-v6-0-354ff4229c00@oss.nxp.com?part=1

  reply	other threads:[~2026-07-01  9:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01  9:29 [PATCH v6 0/5] add runtime suspend/resume support joy.zou
2026-07-01  9:29 ` [PATCH v6 1/5] dmaengine: fsl-edma: use devm_clk_get_optional() for channel clock joy.zou
2026-07-01  9:38   ` sashiko-bot [this message]
2026-07-01  9:29 ` [PATCH v6 2/5] dmaengine: fsl-edma: use devm_clk_get_optional() for DMA engine clock joy.zou
2026-07-01  9:40   ` sashiko-bot
2026-07-01  9:29 ` [PATCH v6 3/5] dmaengine: fsl-edma: convert DMAMUX clock handling to bulk clock API joy.zou
2026-07-01  9:39   ` sashiko-bot
2026-07-01  9:29 ` [PATCH v6 4/5] dmaengine: fsl-edma: add runtime suspend/resume support joy.zou
2026-07-01  9:43   ` sashiko-bot
2026-07-01 14:50     ` Frank Li
2026-07-01  9:29 ` [PATCH v6 5/5] dmaengine: fsl-edma: fix use-after-free after dev_pm_domain_detach() joy.zou
2026-07-01  9:44   ` sashiko-bot
2026-07-01 14:47   ` Frank Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260701093847.17A541F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=joy.zou@oss.nxp.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox