From: sashiko-bot@kernel.org
To: "Triet Hoang" <triet.hoang.dev@gmail.com>
Cc: linux-sunxi@lists.linux.dev
Subject: Re: [PATCH] PM / devfreq: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Date: Thu, 20 Aug 2026 07:35:30 +0000 [thread overview]
Message-ID: <20260820073530.BF8C91F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260820072636.2049617-1-triet.hoang.dev@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The drivers incorrectly use `pm_sleep_ptr()` instead of `pm_ptr()` for assigning the `dev_pm_ops` structure pointer to the driver's `.pm` field.
--
--- Patch [1]: [PATCH] PM / devfreq: Convert to DEFINE_SIMPLE_DEV_PM_OPS() ---
commit a6ee24f192dd2bca22b18dedee330c5384183db0
Author: Triet Hoang <triet.hoang.dev@gmail.com>
PM / devfreq: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
This commit converts the deprecated SIMPLE_DEV_PM_OPS to
DEFINE_SIMPLE_DEV_PM_OPS and drops __maybe_unused annotations. It also
updates the pm assignments to reduce kernel size when PM configs are
disabled.
> diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
> index dbdce7636ca5b..3ebc817fa6084 100644
> --- a/drivers/devfreq/rk3399_dmc.c
> +++ b/drivers/devfreq/rk3399_dmc.c
[ ... ]
> @@ -477,7 +477,7 @@ static struct platform_driver rk3399_dmcfreq_driver = {
> .remove = rk3399_dmcfreq_remove,
> .driver = {
> .name = "rk3399-dmc-freq",
> - .pm = &rk3399_dmcfreq_pm,
> + .pm = pm_sleep_ptr(&rk3399_dmcfreq_pm),
[Severity: Low]
Should this use pm_ptr() instead of pm_sleep_ptr() for the structure pointer?
According to PM subsystem guidelines, pm_sleep_ptr() is intended for sleep
callbacks, while pm_ptr() should be used for the dev_pm_ops structure pointer
itself.
> .of_match_table = rk3399dmc_devfreq_of_match,
> },
> };
> diff --git a/drivers/devfreq/sun8i-a33-mbus.c b/drivers/devfreq/sun8i-a33-mbus.c
> index 4bd5657558d6b..1636501c753ee 100644
> --- a/drivers/devfreq/sun8i-a33-mbus.c
> +++ b/drivers/devfreq/sun8i-a33-mbus.c
[ ... ]
> @@ -479,7 +479,7 @@ static struct platform_driver sun8i_a33_mbus_driver = {
> .driver = {
> .name = "sun8i-a33-mbus",
> .of_match_table = sun8i_a33_mbus_of_match,
> - .pm = pm_ptr(&sun8i_a33_mbus_pm_ops),
> + .pm = pm_sleep_ptr(&sun8i_a33_mbus_pm_ops),
[Severity: Low]
Similar to the rk3399_dmc driver above, should this remain pm_ptr() for the
structure pointer instead of being changed to pm_sleep_ptr()?
> },
> };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260820072636.2049617-1-triet.hoang.dev@gmail.com?part=1
prev parent reply other threads:[~2026-08-20 7:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 7:26 [PATCH] PM / devfreq: Convert to DEFINE_SIMPLE_DEV_PM_OPS() Triet Hoang
2026-08-20 7:35 ` sashiko-bot [this message]
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=20260820073530.BF8C91F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
--cc=triet.hoang.dev@gmail.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