From: sashiko-bot@kernel.org
To: "Triet Hoang" <triet.hoang.dev@gmail.com>
Cc: linux-watchdog@vger.kernel.org
Subject: Re: [PATCH 7/8] watchdog: sp805_wdt: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Date: Wed, 26 Aug 2026 06:18:28 +0000 [thread overview]
Message-ID: <20260826061829.074911F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260826060839.203297-8-triet.hoang.dev@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Incorrect PM macro used for dev_pm_ops structure pointer
--
commit 9fbd3f6262590348a0368f82478f6de749787ec2
Author: Triet Hoang <triet.hoang.dev@gmail.com>
watchdog: sp805_wdt: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
This commit converts the deprecated SIMPLE_DEV_PM_OPS() to
DEFINE_SIMPLE_DEV_PM_OPS() and wraps the struct pointer. This allows the
removal of __maybe_unused annotations from the callbacks.
> diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
> index c2125f204a137..7b01011a5bc86 100644
> --- a/drivers/watchdog/sp805_wdt.c
> +++ b/drivers/watchdog/sp805_wdt.c
[ ... ]
> @@ -361,7 +361,7 @@ MODULE_DEVICE_TABLE(amba, sp805_wdt_ids);
> static struct amba_driver sp805_wdt_driver = {
> .drv = {
> .name = MODULE_NAME,
> - .pm = &sp805_wdt_dev_pm_ops,
> + .pm = pm_sleep_ptr(&sp805_wdt_dev_pm_ops),
[Severity: Low]
Should this use pm_ptr() instead of pm_sleep_ptr() for the structure pointer?
According to the power management guidelines, dev_pm_ops structure pointers
should be wrapped with pm_ptr() rather than pm_sleep_ptr(). Using
pm_sleep_ptr() here drops the entire dev_pm_ops structure when CONFIG_PM_SLEEP
is disabled. If runtime PM callbacks are added to this structure in the future,
they will be incorrectly discarded even when CONFIG_PM is enabled.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260826060839.203297-1-triet.hoang.dev@gmail.com?part=7
next prev parent reply other threads:[~2026-08-26 6:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 6:08 [PATCH 0/8] watchdog: Convert drivers to DEFINE_SIMPLE_DEV_PM_OPS() Triet Hoang
2026-08-26 6:08 ` [PATCH 1/8] watchdog: cadence_wdt: Convert " Triet Hoang
2026-08-26 6:08 ` [PATCH 2/8] watchdog: da9062: " Triet Hoang
2026-08-27 7:42 ` Tzung-Bi Shih
2026-08-27 13:25 ` Guenter Roeck
2026-08-26 6:08 ` [PATCH 3/8] watchdog: keembay_wdt: " Triet Hoang
2026-08-26 6:17 ` sashiko-bot
2026-08-26 21:38 ` Guenter Roeck
2026-08-26 6:08 ` [PATCH 4/8] watchdog: msc313e_wdt: " Triet Hoang
2026-08-26 6:20 ` sashiko-bot
2026-08-27 4:53 ` Tzung-Bi Shih
2026-08-26 6:08 ` [PATCH 5/8] watchdog: of_xilinx_wdt: " Triet Hoang
2026-08-26 6:08 ` [PATCH 6/8] watchdog: pm8916_wdt: " Triet Hoang
2026-08-26 6:08 ` [PATCH 7/8] watchdog: sp805_wdt: " Triet Hoang
2026-08-26 6:18 ` sashiko-bot [this message]
2026-08-26 6:08 ` [PATCH 8/8] watchdog: stmp3xxx_rtc_wdt: " Triet Hoang
2026-08-26 6:19 ` sashiko-bot
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=20260826061829.074911F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--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