From: sashiko-bot@kernel.org
To: "Sudeep Holla" <sudeep.holla@kernel.org>
Cc: linux-gpio@vger.kernel.org, imx@lists.linux.dev, Frank.Li@kernel.org
Subject: Re: [PATCH v2 2/4] firmware: arm_scmi: Skip requests for standard protocol devices
Date: Mon, 05 Oct 2026 09:18:42 +0000 [thread overview]
Message-ID: <20261005091843.13F271F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261005-scmi_bus_fixes-v2-2-34a51338875a@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] arm_scmi: dead code in scmi_device_create() for standard devices
--
commit cb938ad959a8195c8129d8e6f7596ff9fd2ddff8
Author: Sudeep Holla <sudeep.holla@kernel.org>
firmware: arm_scmi: Skip requests for standard protocol devices
The SCMI core skips request tracking for standard protocol devices to avoid
issues when unregistered drivers destroy the core-created device. Keep
request tracking and rollback for nonstandard devices unchanged.
> diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c
> index f2e2ed56bc326..230ee9f6f1aa5 100644
> --- a/drivers/firmware/arm_scmi/bus.c
> +++ b/drivers/firmware/arm_scmi/bus.c
> @@ -186,12 +186,44 @@ static void scmi_protocol_device_unrequest(const struct scmi_device_id *id_table
[ ... ]
> static int scmi_protocol_table_register(const struct scmi_device_id *id_table)
> {
> const struct scmi_device_id *entry;
> int ret;
>
> for (entry = id_table; entry->name[0]; entry++) {
> + /* Skip standard devices as they are created unconditionally */
> + if (scmi_device_id_in_std_id_table(entry))
> + continue;
> +
> ret = scmi_protocol_device_request(entry);
> if (ret)
> goto err_unrequest;
[Severity: Low]
Does this change make the check for standard devices in scmi_device_create()
obsolete?
Since standard devices are no longer passed to scmi_protocol_device_request(),
they aren't added to the scmi_requested_devices IDR. When scmi_device_create()
subsequently walks the requested list, phead will only contain non-standard
devices:
drivers/firmware/arm_scmi/bus.c:scmi_device_create() {
...
/* Walk the list of requested devices for protocol and create them */
list_for_each_entry(rdev, phead, node) {
/* Standard proto matches already have their dev created above */
if (scmi_device_id_in_std_id_table(rdev->id_table))
continue;
...
}
Will this check in scmi_device_create() always evaluate to false now, making
it dead code?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261005-scmi_bus_fixes-v2-0-34a51338875a@kernel.org?part=2
next prev parent reply other threads:[~2026-10-05 9:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 9:04 [PATCH v2 0/4] firmware: arm_scmi: Some fixes to address conflicts with fw_devlink Sudeep Holla
2026-10-05 9:04 ` [PATCH v2 1/4] firmware: arm_scmi: Avoid protocol devices in exclusive raw mode Sudeep Holla
2026-10-05 9:04 ` [PATCH v2 2/4] firmware: arm_scmi: Skip requests for standard protocol devices Sudeep Holla
2026-10-05 9:18 ` sashiko-bot [this message]
2026-10-05 9:31 ` Sudeep Holla
2026-10-05 9:04 ` [PATCH v2 3/4] pinctrl: imx: Match the standard SCMI pinctrl device Sudeep Holla
2026-10-07 11:17 ` Linus Walleij
2026-10-05 9:04 ` [PATCH v2 4/4] firmware: arm_scmi: Skip unused performance-domain devices Sudeep Holla
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=20261005091843.13F271F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=imx@lists.linux.dev \
--cc=linux-gpio@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sudeep.holla@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.