mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vladimir Zapolskiy <vz@mleia.com>
To: Tian Xuechen <202300460064@mail.sdu.edu.cn>, vkoul@kernel.org
Cc: Frank.Li@kernel.org, Frank.li@oss.nxp.com,
	dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	piotr.wojtaszczyk@timesys.com, manabian@gmail.com,
	robh@kernel.org, saravanak@kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 2/3] dmaengine: lpc18xx-dmamux: Use managed DMA router registration
Date: Sat, 28 Nov 2026 15:22:29 +0200	[thread overview]
Message-ID: <f140988f-823b-43e6-a6b1-3356d5df5c5e@mleia.com> (raw)
In-Reply-To: <20261127110400.379397-3-202300460064@mail.sdu.edu.cn>

On 11/27/26 13:03, Tian Xuechen wrote:
> The DMA router remains in the OF registry after its device-managed
> data is released. Use managed registration to remove the routing
> entry before the router data is freed.
> 
> This issue was found by our static analysis tool under development.
> 
> Fixes: e5f4ae84be74 ("dmaengine: add driver for lpc18xx dmamux")

The change is correct, but it should be clear that the fix does not
apply to the fixed commit:

Cc: stable+noautosel@kernel.org # relies on new API

> Signed-off-by: Tian Xuechen <202300460064@mail.sdu.edu.cn>
> ---
> Changes in v2:
>    - Use devm_of_dma_router_register() instead of a remove callback.
> 
>   drivers/dma/lpc18xx-dmamux.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/lpc18xx-dmamux.c b/drivers/dma/lpc18xx-dmamux.c
> index d3ff521951b8..0c6758c53a72 100644
> --- a/drivers/dma/lpc18xx-dmamux.c
> +++ b/drivers/dma/lpc18xx-dmamux.c
> @@ -166,8 +166,9 @@ static int lpc18xx_dmamux_probe(struct platform_device *pdev)
>   	dmamux->dmarouter.dev = &pdev->dev;
>   	dmamux->dmarouter.route_free = lpc18xx_dmamux_free;
>   
> -	return of_dma_router_register(np, lpc18xx_dmamux_reserve,
> -				      &dmamux->dmarouter);
> +	return devm_of_dma_router_register(&pdev->dev, np,
> +					   lpc18xx_dmamux_reserve,
> +					   &dmamux->dmarouter);
>   }
>   
>   static const struct of_device_id lpc18xx_dmamux_match[] = {

Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>

-- 
Best wishes,
Vladimir

  parent reply	other threads:[~2026-11-28 13:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 11:03 [PATCH v2 0/3] dmaengine: lpc: Manage " Tian Xuechen
2026-11-27 11:03 ` [PATCH v2 1/3] dmaengine: of: Add managed " Tian Xuechen
2026-11-27 15:21   ` Frank Li
2026-11-28 13:18   ` Vladimir Zapolskiy
2026-11-27 11:03 ` [PATCH v2 2/3] dmaengine: lpc18xx-dmamux: Use " Tian Xuechen
2026-11-27 15:22   ` Frank Li
2026-11-28 13:22   ` Vladimir Zapolskiy [this message]
2026-11-27 11:04 ` [PATCH v2 3/3] dmaengine: lpc32xx-dmamux: " Tian Xuechen
2026-11-27 15:22   ` Frank Li
2026-11-28 13:23   ` Vladimir Zapolskiy

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=f140988f-823b-43e6-a6b1-3356d5df5c5e@mleia.com \
    --to=vz@mleia.com \
    --cc=202300460064@mail.sdu.edu.cn \
    --cc=Frank.Li@kernel.org \
    --cc=Frank.li@oss.nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manabian@gmail.com \
    --cc=piotr.wojtaszczyk@timesys.com \
    --cc=robh@kernel.org \
    --cc=saravanak@kernel.org \
    --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

all inboxes | Powered by JetHome®