From: sashiko-bot@kernel.org
To: Zhipeng.wang_1@oss.nxp.com
Cc: Frank.Li@kernel.org, imx@lists.linux.dev
Subject: Re: [PATCH v5 7/9] irqchip/imx-irqsteer: Allow building as module
Date: Fri, 21 Aug 2026 10:26:40 +0000 [thread overview]
Message-ID: <20260821102641.102DF1F0155B@smtp.kernel.org> (raw)
In-Reply-To: <20260821101039.4037925-8-Zhipeng.wang_1@oss.nxp.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Unbalanced `pm_runtime_resume_and_get()` in `imx_irqsteer_remove()` leaks the PM runtime usage counter, breaking autosuspend upon module reload.
--
--- Patch [7]: [PATCH v5 7/9] irqchip/imx-irqsteer: Allow building as module ---
commit 392fba6a4866bd8979dac996d023521bdcba0251
Author: Jindong Yue <jindong.yue@nxp.com>
irqchip/imx-irqsteer: Allow building as module
This patch makes the imx-irqsteer driver buildable as a module by changing
the Kconfig symbol to tristate. It also replaces builtin_platform_driver()
with module_platform_driver() and adds the necessary module metadata.
> diff --git a/drivers/irqchip/irq-imx-irqsteer.c b/drivers/irqchip/irq-imx-irqsteer.c
> index c2f58787f9a86..dad09e095ed1a 100644
> --- a/drivers/irqchip/irq-imx-irqsteer.c
> +++ b/drivers/irqchip/irq-imx-irqsteer.c
[ ... ]
> @@ -380,4 +382,7 @@ static struct platform_driver imx_irqsteer_driver = {
> .probe = imx_irqsteer_probe,
> .remove = imx_irqsteer_remove,
> };
> -builtin_platform_driver(imx_irqsteer_driver);
> +module_platform_driver(imx_irqsteer_driver);
[Severity: Medium]
Will this leak the PM runtime usage counter on module unload?
When module unloading is enabled by this change, unloading the driver calls
imx_irqsteer_remove().
In that function, pm_runtime_resume_and_get() is called without a balancing
put:
drivers/irqchip/irq-imx-irqsteer.c:imx_irqsteer_remove() {
...
pm_runtime_resume_and_get(&pdev->dev);
...
}
Because the driver core does not reset this usage count on device unbind,
and there is no balancing pm_runtime_put_noidle() before the function
exits, the PM runtime usage count is incremented permanently.
If the module is subsequently reloaded, will it start with an elevated
usage count, preventing the device from entering runtime suspend and leaving
its clock enabled indefinitely?
> +
> +MODULE_DESCRIPTION("i.MX IRQSTEER interrupt multiplexer/remapper driver");
> +MODULE_LICENSE("GPL");
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260821101039.4037925-1-Zhipeng.wang_1@oss.nxp.com?part=7
next prev parent reply other threads:[~2026-08-21 10:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 10:10 [PATCH v5 0/9] irqchip/imx-irqsteer: Allow building as module Zhipeng.wang_1
2026-08-21 10:10 ` [PATCH v5 1/9] irqchip/imx-irqsteer: Call chained_irq_exit() on the handler error path Zhipeng.wang_1
2026-08-21 14:15 ` Frank Li
2026-08-21 10:10 ` [PATCH v5 2/9] irqchip/imx-irqsteer: Use devm to manage the IRQ domain Zhipeng.wang_1
2026-08-21 10:10 ` [PATCH v5 3/9] irqchip/imx-irqsteer: Validate IRQ count before creating domain Zhipeng.wang_1
2026-08-21 14:24 ` Frank Li
2026-08-24 9:38 ` Zhipeng Wang (OSS)
2026-08-24 12:49 ` Fabio Estevam
2026-08-26 3:26 ` Zhipeng Wang (OSS)
2026-08-21 10:10 ` [PATCH v5 4/9] irqchip/imx-irqsteer: Dispose of parent IRQ mappings in remove() Zhipeng.wang_1
2026-08-21 10:10 ` [PATCH v5 5/9] irqchip/imx-irqsteer: Mask all interrupts in probe() Zhipeng.wang_1
2026-08-21 10:10 ` [PATCH v5 6/9] irqchip/imx-irqsteer: Let devres own the clock and runtime PM Zhipeng.wang_1
2026-08-21 10:26 ` sashiko-bot
2026-08-26 5:53 ` Zhipeng Wang (OSS)
2026-08-21 10:10 ` [PATCH v5 7/9] irqchip/imx-irqsteer: Allow building as module Zhipeng.wang_1
2026-08-21 10:26 ` sashiko-bot [this message]
2026-08-21 10:10 ` [PATCH v5 8/9] genirq/irqdomain: Add devm_irq_domain_create_linear() Zhipeng.wang_1
2026-08-21 10:10 ` [PATCH v5 9/9] irqchip/imx-irqsteer: Use devm_irq_domain_create_linear() Zhipeng.wang_1
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=20260821102641.102DF1F0155B@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=Zhipeng.wang_1@oss.nxp.com \
--cc=imx@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
/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