* [PATCH] pinctrl: aspeed: Use managed pinctrl registration
@ 2026-11-07 1:22 Prasanth Kumar Padarthi
2026-11-07 1:29 ` sashiko-bot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Prasanth Kumar Padarthi @ 2026-11-07 1:22 UTC (permalink / raw)
To: andrew, linusw
Cc: joel, ryan_chen, billy_tsai, linux-aspeed, openbmc, linux-gpio,
linux-arm-kernel, linux-kernel, Prasanth Kumar Padarthi
The shared Aspeed probe helper registers its controller with
pinctrl_register(), but does not unregister it on device unbind.
The registration can therefore outlive device-managed data.
Use devm_pinctrl_register() to ensure the controller is unregistered
during device teardown.
Signed-off-by: Prasanth Kumar Padarthi <prasanth.padarthi10@gmail.com>
---
drivers/pinctrl/aspeed/pinctrl-aspeed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed.c b/drivers/pinctrl/aspeed/pinctrl-aspeed.c
index 7e0ebf11af16..eb5f404af8c2 100644
--- a/drivers/pinctrl/aspeed/pinctrl-aspeed.c
+++ b/drivers/pinctrl/aspeed/pinctrl-aspeed.c
@@ -461,7 +461,7 @@ int aspeed_pinctrl_probe(struct platform_device *pdev,
pdata->pinmux.maps[ASPEED_IP_SCU] = pdata->scu;
- pctl = pinctrl_register(pdesc, &pdev->dev, pdata);
+ pctl = devm_pinctrl_register(&pdev->dev, pdesc, pdata);
if (IS_ERR(pctl)) {
dev_err(&pdev->dev, "Failed to register pinctrl\n");
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] pinctrl: aspeed: Use managed pinctrl registration
2026-11-07 1:22 [PATCH] pinctrl: aspeed: Use managed pinctrl registration Prasanth Kumar Padarthi
@ 2026-11-07 1:29 ` sashiko-bot
2026-11-09 2:50 ` Andrew Jeffery
2026-11-09 3:56 ` [PATCH v2] " Prasanth Kumar Padarthi
2 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-11-07 1:29 UTC (permalink / raw)
To: Prasanth Kumar Padarthi; +Cc: linux-gpio
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] pinctrl: aspeed: missing Fixes trailer for unmanaged
pinctrl_register() leak
--
commit 31a2821a3adb8fc70b45a6dcb2edc40ec8684675
Author: Prasanth Kumar Padarthi <prasanth.padarthi10@gmail.com>
> pinctrl: aspeed: Use managed pinctrl registration
>
> The shared Aspeed probe helper registers its controller with
> pinctrl_register(), but does not unregister it on device unbind.
> The registration can therefore outlive device-managed data.
>
> Use devm_pinctrl_register() to ensure the controller is unregistered
> during device teardown.
>
> Signed-off-by: Prasanth Kumar Padarthi <prasanth.padarthi10@gmail.com>
[Severity: Low]
Should this include a Fixes tag for the commit that introduced the
unmanaged pinctrl_register() call in aspeed_pinctrl_probe()?
Fixes: 4d3d0e4272d8 ("pinctrl: Add core support for Aspeed SoCs")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261107012236.28069-1-prasanth.padarthi10@gmail.com?part=1
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] pinctrl: aspeed: Use managed pinctrl registration
2026-11-07 1:22 [PATCH] pinctrl: aspeed: Use managed pinctrl registration Prasanth Kumar Padarthi
2026-11-07 1:29 ` sashiko-bot
@ 2026-11-09 2:50 ` Andrew Jeffery
2026-11-09 3:56 ` [PATCH v2] " Prasanth Kumar Padarthi
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Jeffery @ 2026-11-09 2:50 UTC (permalink / raw)
To: Prasanth Kumar Padarthi, linusw
Cc: joel, ryan_chen, billy_tsai, linux-aspeed, openbmc, linux-gpio,
linux-arm-kernel, linux-kernel
On Sat, 2026-11-07 at 06:52 +0530, Prasanth Kumar Padarthi wrote:
> The shared Aspeed probe helper registers its controller with
> pinctrl_register(), but does not unregister it on device unbind.
> The registration can therefore outlive device-managed data.
>
> Use devm_pinctrl_register() to ensure the controller is unregistered
> during device teardown.
>
> Signed-off-by: Prasanth Kumar Padarthi <prasanth.padarthi10@gmail.com>
Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] pinctrl: aspeed: Use managed pinctrl registration
2026-11-07 1:22 [PATCH] pinctrl: aspeed: Use managed pinctrl registration Prasanth Kumar Padarthi
2026-11-07 1:29 ` sashiko-bot
2026-11-09 2:50 ` Andrew Jeffery
@ 2026-11-09 3:56 ` Prasanth Kumar Padarthi
2 siblings, 0 replies; 4+ messages in thread
From: Prasanth Kumar Padarthi @ 2026-11-09 3:56 UTC (permalink / raw)
To: andrew, linusw
Cc: joel, ryan_chen, billy_tsai, linux-aspeed, openbmc, linux-gpio,
linux-arm-kernel, linux-kernel, Prasanth Kumar Padarthi
The shared Aspeed probe helper registers its controller with
pinctrl_register(), but does not unregister it on device unbind.
The registration can therefore outlive device-managed data.
Use devm_pinctrl_register() to ensure the controller is unregistered
during device teardown.
Fixes: 4d3d0e4272d8 ("pinctrl: Add core support for Aspeed SoCs")
Signed-off-by: Prasanth Kumar Padarthi <prasanth.padarthi10@gmail.com>
Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au>
---
Changes in v2:
- Add Fixes trailer.
- Add Reviewed-by trailer from Andrew Jeffery.
drivers/pinctrl/aspeed/pinctrl-aspeed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed.c b/drivers/pinctrl/aspeed/pinctrl-aspeed.c
index 7e0ebf11af16..eb5f404af8c2 100644
--- a/drivers/pinctrl/aspeed/pinctrl-aspeed.c
+++ b/drivers/pinctrl/aspeed/pinctrl-aspeed.c
@@ -461,7 +461,7 @@ int aspeed_pinctrl_probe(struct platform_device *pdev,
pdata->pinmux.maps[ASPEED_IP_SCU] = pdata->scu;
- pctl = pinctrl_register(pdesc, &pdev->dev, pdata);
+ pctl = devm_pinctrl_register(&pdev->dev, pdesc, pdata);
if (IS_ERR(pctl)) {
dev_err(&pdev->dev, "Failed to register pinctrl\n");
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-09 3:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-07 1:22 [PATCH] pinctrl: aspeed: Use managed pinctrl registration Prasanth Kumar Padarthi
2026-11-07 1:29 ` sashiko-bot
2026-11-09 2:50 ` Andrew Jeffery
2026-11-09 3:56 ` [PATCH v2] " Prasanth Kumar Padarthi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox