All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Alex Tran" <alex.tran@oss.qualcomm.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v2 3/5] hwmon: scmi-hwmon: Log number of sensors
Date: Thu, 14 May 2026 09:29:43 +0000	[thread overview]
Message-ID: <20260514092943.B5DFEC2BCB3@smtp.kernel.org> (raw)
In-Reply-To: <20260513-scmi-client-probe-log-v2-3-36607e9dd540@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The scmi_hwmon_probe function configures the wrong sensors because it passes the array index `i` instead of the actual firmware `sensor->id` to `sensor_ops->config_set`.
--

commit adc025236960e1cfd8886f8043954aa0a9f37bc8
Author: Alex Tran <alex.tran@oss.qualcomm.com>

hwmon: scmi-hwmon: Log number of sensors

This commit logs the number of discovered sensors upon a successful probe in
the SCMI hwmon driver. This aligns the driver with the existing SCMI client
driver logging pattern, making it easier to confirm firmware-exposed resources
during debugging.

> diff --git a/drivers/hwmon/scmi-hwmon.c b/drivers/hwmon/scmi-hwmon.c
> index eec223d174c07..456ce11d050c6 100644
> --- a/drivers/hwmon/scmi-hwmon.c
> +++ b/drivers/hwmon/scmi-hwmon.c
> @@ -335,49 +335,50 @@ static int scmi_hwmon_probe(struct scmi_device *sdev)
[ ... ]
>  	for (i = 0; i < nr_count_temp; i++) {
>  		int ret;
>  
>  		sensor = *(scmi_sensors->info[hwmon_temp] + i);
>  		if (!sensor)
>  			continue;
>  
>  		ret = sensor_ops->config_set(ph, i, sensor_config);

This isn't a regression introduced by this commit, but could passing the
local array index i to sensor_ops->config_set() instead of the firmware
sensor->id result in configuring the wrong sensors?

Since SCMI sensor IDs are global and can map to any sensor type, passing
the local array index might mistakenly configure arbitrary unrelated
hardware components.

Could this leave the actual temperature sensors unconfigured and break
subsequent thermal zone registration? Is it possible that thermal
mitigation would fail to function correctly due to the underlying
temperature sensors remaining disabled?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260513-scmi-client-probe-log-v2-0-36607e9dd540@oss.qualcomm.com?part=3

  reply	other threads:[~2026-05-14  9:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 17:16 [PATCH v2 0/5] scmi: Log client subsystem entity counts Alex Tran
2026-05-13 17:16 ` [PATCH v2 1/5] powercap: arm_scmi_powercap: Log number of powercap domains Alex Tran
2026-05-14  8:00   ` sashiko-bot
2026-05-13 17:16 ` [PATCH v2 2/5] cpufreq: scmi-cpufreq: Log number of perf domains Alex Tran
2026-05-14  8:42   ` sashiko-bot
2026-05-13 17:16 ` [PATCH v2 3/5] hwmon: scmi-hwmon: Log number of sensors Alex Tran
2026-05-14  9:29   ` sashiko-bot [this message]
2026-05-13 17:16 ` [PATCH v2 4/5] reset: reset-scmi: Log number of reset domains Alex Tran
2026-05-14  9:43   ` sashiko-bot
2026-05-13 17:16 ` [PATCH v2 5/5] pinctrl: pinctrl-scmi: Log number of pins, groups, functions Alex Tran
2026-05-13 18:06   ` Andy Shevchenko
2026-05-14 10:22   ` sashiko-bot
2026-05-13 18:04 ` [PATCH v2 0/5] scmi: Log client subsystem entity counts Andy Shevchenko
2026-05-14 15:44 ` Jonathan Cameron
2026-05-14 18:42   ` Sudeep Holla
2026-05-14 21:23   ` Alex Tran
2026-05-15  8:29     ` 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=20260514092943.B5DFEC2BCB3@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=alex.tran@oss.qualcomm.com \
    --cc=linux-hwmon@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 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.