* [PATCH 0/2] dmaengine: lpc: Unregister DMA routers on removal
@ 2026-11-26 13:28 Tian Xuechen
2026-11-26 13:28 ` [PATCH 1/2] dmaengine: lpc18xx-dmamux: Unregister the DMA router " Tian Xuechen
2026-11-26 13:28 ` [PATCH 2/2] dmaengine: lpc32xx-dmamux: " Tian Xuechen
0 siblings, 2 replies; 4+ messages in thread
From: Tian Xuechen @ 2026-11-26 13:28 UTC (permalink / raw)
To: vkoul, vz, piotr.wojtaszczyk, manabian
Cc: Frank.Li, dmaengine, linux-arm-kernel, liguangshuo
From: Tian Xuechen <202300460064@mail.sdu.edu.cn>
Pair router registration with teardown in the LPC18xx and LPC32xx DMA
mux drivers.
Tian Xuechen (2):
dmaengine: lpc18xx-dmamux: Unregister the DMA router on removal
dmaengine: lpc32xx-dmamux: Unregister the DMA router on removal
base-commit: 4dce97c6c265544342e716e62fd24bbb232590c5
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] dmaengine: lpc18xx-dmamux: Unregister the DMA router on removal
2026-11-26 13:28 [PATCH 0/2] dmaengine: lpc: Unregister DMA routers on removal Tian Xuechen
@ 2026-11-26 13:28 ` Tian Xuechen
2026-11-26 16:03 ` Frank Li
2026-11-26 13:28 ` [PATCH 2/2] dmaengine: lpc32xx-dmamux: " Tian Xuechen
1 sibling, 1 reply; 4+ messages in thread
From: Tian Xuechen @ 2026-11-26 13:28 UTC (permalink / raw)
To: vkoul, vz, piotr.wojtaszczyk, manabian
Cc: Frank.Li, dmaengine, linux-arm-kernel, liguangshuo
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,
.driver = {
.name = "lpc18xx-dmamux",
.of_match_table = lpc18xx_dmamux_match,
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] dmaengine: lpc32xx-dmamux: Unregister the DMA router on removal
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 13:28 ` Tian Xuechen
1 sibling, 0 replies; 4+ messages in thread
From: Tian Xuechen @ 2026-11-26 13:28 UTC (permalink / raw)
To: vkoul, vz, piotr.wojtaszczyk, manabian
Cc: Frank.Li, dmaengine, linux-arm-kernel, liguangshuo
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: 5d318b595982 ("dmaengine: Add dma router for pl08x in LPC32XX SoC")
Signed-off-by: Tian Xuechen <202300460064@mail.sdu.edu.cn>
---
drivers/dma/lpc32xx-dmamux.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/dma/lpc32xx-dmamux.c b/drivers/dma/lpc32xx-dmamux.c
index 4fbeb3496acf..397640aacd8e 100644
--- a/drivers/dma/lpc32xx-dmamux.c
+++ b/drivers/dma/lpc32xx-dmamux.c
@@ -184,6 +184,11 @@ static int lpc32xx_dmamux_probe(struct platform_device *pdev)
&dmamux->dmarouter);
}
+static void lpc32xx_dmamux_remove(struct platform_device *pdev)
+{
+ of_dma_router_free(pdev->dev.of_node);
+}
+
static const struct of_device_id lpc32xx_dmamux_match[] = {
{ .compatible = "nxp,lpc3220-dmamux" },
{},
@@ -191,6 +196,7 @@ static const struct of_device_id lpc32xx_dmamux_match[] = {
static struct platform_driver lpc32xx_dmamux_driver = {
.probe = lpc32xx_dmamux_probe,
+ .remove = lpc32xx_dmamux_remove,
.driver = {
.name = "lpc32xx-dmamux",
.of_match_table = lpc32xx_dmamux_match,
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] dmaengine: lpc18xx-dmamux: Unregister the DMA router on removal
2026-11-26 13:28 ` [PATCH 1/2] dmaengine: lpc18xx-dmamux: Unregister the DMA router " Tian Xuechen
@ 2026-11-26 16:03 ` Frank Li
0 siblings, 0 replies; 4+ messages in thread
From: Frank Li @ 2026-11-26 16:03 UTC (permalink / raw)
To: Tian Xuechen
Cc: vkoul, vz, piotr.wojtaszczyk, manabian, Frank.Li, dmaengine,
linux-arm-kernel, liguangshuo
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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-26 16:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-11-26 13:28 ` [PATCH 2/2] dmaengine: lpc32xx-dmamux: " Tian Xuechen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox