DMA Engine development
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@oss.nxp.com>
To: Tian Xuechen <202300460064@mail.sdu.edu.cn>
Cc: vireshk@kernel.org, vkoul@kernel.org, miquel.raynal@bootlin.com,
	ilpo.jarvinen@linux.intel.com, andriy.shevchenko@linux.intel.com,
	Frank.Li@kernel.org, dmaengine@vger.kernel.org,
	liguangshuo@mail.sdu.edu.cn
Subject: Re: [PATCH] dmaengine: dw: dmamux: Unregister the RZ/N1 DMA router on removal
Date: Thu, 3 Dec 2026 10:33:04 -0600	[thread overview]
Message-ID: <axGZwK_S5bdGRwpO@SMW015318> (raw)
In-Reply-To: <20261129094743.1691766-1-202300460064@mail.sdu.edu.cn>

On Sun, Nov 29, 2026 at 05:47:43PM +0800, Tian Xuechen wrote:
> From: Tian Xuechen <202300460064@mail.sdu.edu.cn>
>
> The RZ/N1 driver leaves its router in the OF DMA registry when the
> device is unbound. Unregister the router before devres releases the
> router data.
>
> This issue was found by our static analysis tool under development.
>
> Fixes: 134d9c52fca2 ("dmaengine: dw: dmamux: Introduce RZN1 DMA router support")
> Signed-off-by: Tian Xuechen <202300460064@mail.sdu.edu.cn>
> ---

Can you combine all your of_dma_router patches to prevous serial

https://patchwork.kernel.org/project/linux-dmaengine/patch/20261127110400.379397-2-202300460064@mail.sdu.edu.cn/

And use devm_of_dma_router_register()

Frank

>  drivers/dma/dw/rzn1-dmamux.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/dma/dw/rzn1-dmamux.c b/drivers/dma/dw/rzn1-dmamux.c
> index ddcd111d57ee..a2b106eb27d5 100644
> --- a/drivers/dma/dw/rzn1-dmamux.c
> +++ b/drivers/dma/dw/rzn1-dmamux.c
> @@ -149,6 +149,11 @@ static int rzn1_dmamux_probe(struct platform_device *pdev)
>  				      &dmamux->dmarouter);
>  }
>
> +static void rzn1_dmamux_remove(struct platform_device *pdev)
> +{
> +	of_dma_router_free(pdev->dev.of_node);
> +}
> +
>  static const struct of_device_id rzn1_dmamux_match[] = {
>  	{ .compatible = "renesas,rzn1-dmamux" },
>  	{}
> @@ -161,6 +166,7 @@ static struct platform_driver rzn1_dmamux_driver = {
>  		.of_match_table = rzn1_dmamux_match,
>  	},
>  	.probe	= rzn1_dmamux_probe,
> +	.remove	= rzn1_dmamux_remove,
>  };
>  module_platform_driver(rzn1_dmamux_driver);
>
>
> base-commit: 4dce97c6c265544342e716e62fd24bbb232590c5
> --
> 2.43.0
>

      parent reply	other threads:[~2026-12-03 16:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29  9:47 [PATCH] dmaengine: dw: dmamux: Unregister the RZ/N1 DMA router on removal Tian Xuechen
2026-12-03 11:06 ` Miquel Raynal
2026-12-03 16:33 ` Frank Li [this message]

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=axGZwK_S5bdGRwpO@SMW015318 \
    --to=frank.li@oss.nxp.com \
    --cc=202300460064@mail.sdu.edu.cn \
    --cc=Frank.Li@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=liguangshuo@mail.sdu.edu.cn \
    --cc=miquel.raynal@bootlin.com \
    --cc=vireshk@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