From: sashiko-bot@kernel.org
To: "Li Jun" <lijun01@kylinos.cn>
Cc: cassel@kernel.org, linux-ide@vger.kernel.org, dlemoal@kernel.org
Subject: Re: [PATCH] ata: ahci_da850: switch to DEFINE_SIMPLE_DEV_PM_OPS
Date: Tue, 08 Sep 2026 02:40:12 +0000 [thread overview]
Message-ID: <20260908024013.6E57E1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260908023054.574049-1-lijun01@kylinos.cn>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing pm_ptr() wrapper when assigning dev_pm_ops, causing an incomplete API migration and dead code retention when PM is disabled.
--
commit 4fb37d41387c46fd87ad058aea812f8fa3640dc6
Author: Li Jun <lijun01@kylinos.cn>
ata: ahci_da850: switch to DEFINE_SIMPLE_DEV_PM_OPS
Replace the deprecated SIMPLE_DEV_PM_OPS macro with the recommended
DEFINE_SIMPLE_DEV_PM_OPS.
> diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c
> index f97566c420f84..ca874f097c2b1 100644
> --- a/drivers/ata/ahci_da850.c
> +++ b/drivers/ata/ahci_da850.c
> @@ -227,7 +227,7 @@ static int ahci_da850_probe(struct platform_device *pdev)
> return rc;
> }
>
> -static SIMPLE_DEV_PM_OPS(ahci_da850_pm_ops, ahci_platform_suspend,
> +static DEFINE_SIMPLE_DEV_PM_OPS(ahci_da850_pm_ops, ahci_platform_suspend,
> ahci_platform_resume);
[Severity: Low]
Should this change also update the driver definition to use the pm_ptr()
macro?
The goal of migrating to DEFINE_SIMPLE_DEV_PM_OPS is to allow dead code
elimination when PM is disabled. However, ahci_da850_pm_ops is still
unconditionally referenced in the ahci_da850_driver structure:
static struct platform_driver ahci_da850_driver = {
...
.driver = {
.name = DRV_NAME,
.of_match_table = ahci_da850_of_match,
.pm = &ahci_da850_pm_ops,
},
};
Can we wrap the assignment with pm_ptr(&ahci_da850_pm_ops) to complete the
API migration and allow the structure to be correctly dropped when CONFIG_PM=n?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260908023054.574049-1-lijun01@kylinos.cn?part=1
prev parent reply other threads:[~2026-09-08 2:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 2:30 [PATCH] ata: ahci_da850: switch to DEFINE_SIMPLE_DEV_PM_OPS Li Jun
2026-09-08 2:40 ` 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=20260908024013.6E57E1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=lijun01@kylinos.cn \
--cc=linux-ide@vger.kernel.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