From: sashiko-bot@kernel.org
To: "Joshua Crofts" <crofts@kernel.org>
Cc: linux-i3c@lists.infradead.org, imx@lists.linux.dev,
Frank.Li@kernel.org,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH 2/2] i3c: master: svc: remove redundant pm_runtime_dont_use_autosuspend() calls
Date: Sat, 07 Nov 2026 11:19:04 +0000 [thread overview]
Message-ID: <sashiko-outbox-202850@kernel.org> (raw)
In-Reply-To: <20261107-dont-use-autosuspend-i3c-v1-2-80a1546354ce@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] i3c: master: svc: clock and pinctrl leak in
svc_i3c_master_remove()
It also noticed 1 related pre-existing issue this patch does not
introduce:
- [Medium] i3c: master: svc: broken probe deferral in
svc_i3c_master_probe() [1]
--
commit bd316ea905bc7cd25e557b9e7ceaaf86534b31c5
Author: Joshua Crofts <crofts@kernel.org>
i3c: master: svc: remove redundant pm_runtime_dont_use_autosuspend() calls
This commit removes pm_runtime_dont_use_autosuspend() calls from the probe
error path and remove callback in svc-i3c-master.
> diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
> index e700392f0801f..9b845b2955be4 100644
> --- a/drivers/i3c/master/svc-i3c-master.c
> +++ b/drivers/i3c/master/svc-i3c-master.c
> @@ -2084,7 +2084,6 @@ static int svc_i3c_master_probe(struct platform_device *pdev)
> return 0;
>
> rpm_disable:
> - pm_runtime_dont_use_autosuspend(&pdev->dev);
> pm_runtime_put_noidle(&pdev->dev);
> pm_runtime_disable(&pdev->dev);
> pm_runtime_set_suspended(&pdev->dev);
[Severity: Medium]
This problem wasn't introduced by this patch, but earlier in
svc_i3c_master_probe() [1], does passing -EINVAL instead of
master->num_clks to dev_err_probe() break probe deferral?
drivers/i3c/master/svc-i3c-master.c:svc_i3c_master_probe() {
...
master->num_clks = devm_clk_bulk_get_all(dev, &master->clks);
if (master->num_clks < 0)
return dev_err_probe(dev, -EINVAL, "can't get I3C clocks\n");
...
}
If the clock provider is not ready and devm_clk_bulk_get_all() returns
-EPROBE_DEFER, probe fails permanently with -EINVAL instead of deferring.
> @@ -2101,7 +2100,6 @@ static void svc_i3c_master_remove(struct platform_device *pdev)
>
> i3c_master_unregister(&master->base);
>
> - pm_runtime_dont_use_autosuspend(&pdev->dev);
> pm_runtime_disable(&pdev->dev);
> }
[Severity: Medium]
Does removing pm_runtime_dont_use_autosuspend() here leave master->clks
prepared and enabled and pinctrl in the active state after driver removal?
i3c_master_unregister() calls i3c_master_bus_cleanup() ->
svc_i3c_master_bus_cleanup(), which wakes &pdev->dev via
pm_runtime_resume_and_get() and then calls pm_runtime_put_autosuspend().
Because autosuspend is enabled with a 1000 ms delay, that call only arms
the autosuspend timer and returns with &pdev->dev still active and
master->clks enabled.
Previously, calling pm_runtime_dont_use_autosuspend() before
pm_runtime_disable() caused the runtime PM core to synchronously run
svc_i3c_runtime_suspend(), which disables and unprepares master->clks and
selects the sleep pinctrl state:
drivers/i3c/master/svc-i3c-master.c:svc_i3c_runtime_suspend() {
struct svc_i3c_master *master = dev_get_drvdata(dev);
svc_i3c_save_regs(master);
clk_bulk_disable_unprepare(master->num_clks, master->clks);
pinctrl_pm_select_sleep_state(dev);
return 0;
}
With pm_runtime_dont_use_autosuspend() removed, pm_runtime_disable()
cancels the pending autosuspend timer without running
svc_i3c_runtime_suspend(), and the later pm_runtime_reinit() in the driver
core runs after runtime PM is already disabled.
[1] https://sashiko.dev/#/bug/linux-7f6f30e6-7dc6-4272-b9a7-e0326db501a1
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261107-dont-use-autosuspend-i3c-v1-0-80a1546354ce@kernel.org?part=2
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
next prev parent reply other threads:[~2026-11-07 11:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 11:06 [PATCH 0/2] i3c: remove redundant pm_runtime_dont_use_autosuspend() calls Joshua Crofts
2026-11-07 11:06 ` [PATCH 1/2] i3c: dw: " Joshua Crofts
2026-11-07 11:12 ` sashiko-bot
2026-11-11 19:37 ` Frank Li
2026-11-07 11:06 ` [PATCH 2/2] i3c: master: svc: " Joshua Crofts
2026-11-07 11:19 ` sashiko-bot [this message]
2026-11-07 12:30 ` Joshua Crofts
2026-11-11 19:43 ` Frank Li
2026-11-12 7:46 ` Joshua Crofts
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=sashiko-outbox-202850@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=crofts@kernel.org \
--cc=imx@lists.linux.dev \
--cc=linux-i3c@lists.infradead.org \
--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