From: Frank Li <Frank.li@oss.nxp.com>
To: Tian Xuechen <202300460064@mail.sdu.edu.cn>
Cc: vkoul@kernel.org, vz@mleia.com, piotr.wojtaszczyk@timesys.com,
manabian@gmail.com, Frank.Li@kernel.org,
dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
liguangshuo@mail.sdu.edu.cn
Subject: Re: [PATCH 1/2] dmaengine: lpc18xx-dmamux: Unregister the DMA router on removal
Date: Thu, 26 Nov 2026 10:03:38 -0600 [thread overview]
Message-ID: <awhYWhhDb1eQYe72@SMW015318> (raw)
In-Reply-To: <20261126132806.4091183-2-202300460064@mail.sdu.edu.cn>
On Thu, Nov 26, 2026 at 09:28:05PM +0800, Tian Xuechen wrote:
> [You don't often get email from 202300460064@mail.sdu.edu.cn. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> From: Tian Xuechen <202300460064@mail.sdu.edu.cn>
>
> The DMA router remains in the OF registry after its device-managed
> data is released. Remove the routing entry when the device is
> unbound.
>
> This issue was found by our static analysis tool under development.
>
> Fixes: e5f4ae84be74 ("dmaengine: add driver for lpc18xx dmamux")
> Signed-off-by: Tian Xuechen <202300460064@mail.sdu.edu.cn>
> ---
> drivers/dma/lpc18xx-dmamux.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/dma/lpc18xx-dmamux.c b/drivers/dma/lpc18xx-dmamux.c
> index 40a338f0d44b..412d425dc1ab 100644
> --- a/drivers/dma/lpc18xx-dmamux.c
> +++ b/drivers/dma/lpc18xx-dmamux.c
> @@ -169,6 +169,11 @@ static int lpc18xx_dmamux_probe(struct platform_device *pdev)
> &dmamux->dmarouter);
> }
>
> +static void lpc18xx_dmamux_remove(struct platform_device *pdev)
> +{
> + of_dma_router_free(pdev->dev.of_node);
> +}
> +
> static const struct of_device_id lpc18xx_dmamux_match[] = {
> { .compatible = "nxp,lpc1850-dmamux" },
> {},
> @@ -176,6 +181,7 @@ static const struct of_device_id lpc18xx_dmamux_match[] = {
>
> static struct platform_driver lpc18xx_dmamux_driver = {
> .probe = lpc18xx_dmamux_probe,
> + .remove = lpc18xx_dmamux_remove,
DMA engine driver almost never unload. so it is not urgent.
Please add devm_of_dma_router_register() API, other mux router also can use
it
Frank
> .driver = {
> .name = "lpc18xx-dmamux",
> .of_match_table = lpc18xx_dmamux_match,
>
> --
> 2.43.0
>
next prev parent reply other threads:[~2026-11-26 16:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 13:28 [PATCH 0/2] dmaengine: lpc: Unregister DMA routers on removal Tian Xuechen
2026-11-26 13:28 ` [PATCH 1/2] dmaengine: lpc18xx-dmamux: Unregister the DMA router " Tian Xuechen
2026-11-26 16:03 ` Frank Li [this message]
2026-11-26 13:28 ` [PATCH 2/2] dmaengine: lpc32xx-dmamux: " Tian Xuechen
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=awhYWhhDb1eQYe72@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=202300460064@mail.sdu.edu.cn \
--cc=Frank.Li@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=liguangshuo@mail.sdu.edu.cn \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=manabian@gmail.com \
--cc=piotr.wojtaszczyk@timesys.com \
--cc=vkoul@kernel.org \
--cc=vz@mleia.com \
/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