Linux Hardware Monitor development
 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 3/5] hwmon: scmi-hwmon: Log number of sensors
Date: Thu, 14 May 2026 08:10:08 +0000	[thread overview]
Message-ID: <20260514081008.8E6ADC2BCB7@smtp.kernel.org> (raw)
In-Reply-To: <20260513-scmi-client-probe-log-v1-3-00b47b1be009@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] The log message incorrectly reports the number of initialized sensors instead of discovered sensors.
- [Low] The format specifier `%d` is used to log an unsigned 16-bit integer.
--

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

hwmon: scmi-hwmon: Log number of sensors

This commit adds a log message to report the number of sensors during probe,
making it easier to confirm the firmware exposed the expected resources.

> diff --git a/drivers/hwmon/scmi-hwmon.c b/drivers/hwmon/scmi-hwmon.c
> index eec223d174c07..6f1b0559d5c28 100644
> --- a/drivers/hwmon/scmi-hwmon.c
> +++ b/drivers/hwmon/scmi-hwmon.c
> @@ -362,6 +362,7 @@ static int scmi_hwmon_probe(struct scmi_device *sdev)
>  		}
>  	}
>  
> +	dev_info(dev, "Initialized %d sensors\n", nr_sensors);

The nr_sensors variable holds the total number of sensors discovered from
the firmware, but the driver filters these and only initializes specific
supported hwmon types like TEMPERATURE_C and VOLTAGE. Should this message
say "Discovered" instead, or perhaps use the count of actually initialized
sensors?

This isn't a bug, but since nr_sensors is a u16, should it use the %u
format specifier instead of %d?

>  	return 0;
>  }

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

  parent reply	other threads:[~2026-05-14  8:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 16:44 [PATCH 0/5] scmi: Log client subsystem entity counts Alex Tran
2026-05-13 16:44 ` [PATCH 1/5] powercap: arm_scmi_powercap: Log number of powercap domains Alex Tran
2026-05-14  7:36   ` sashiko-bot
2026-05-13 16:44 ` [PATCH 2/5] cpufreq: scmi-cpufreq: Log number of perf domains Alex Tran
2026-05-14  8:06   ` sashiko-bot
2026-05-13 16:44 ` [PATCH 3/5] hwmon: scmi-hwmon: Log number of sensors Alex Tran
2026-05-13 16:47   ` Guenter Roeck
2026-05-14  8:10   ` sashiko-bot [this message]
2026-05-13 16:44 ` [PATCH 4/5] reset: reset-scmi: Log number of reset domains Alex Tran
2026-05-14  8:20   ` sashiko-bot
2026-05-13 16:44 ` [PATCH 5/5] pinctrl: pinctrl-scmi: Log number of pins, groups, functions Alex Tran
2026-05-14  9:07   ` sashiko-bot
2026-05-13 18:02 ` [PATCH 0/5] scmi: Log client subsystem entity counts Andy Shevchenko
2026-05-13 18:27   ` Guenter Roeck
2026-05-14  6:48     ` Greg Kroah-Hartman
2026-05-14 10:38       ` 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=20260514081008.8E6ADC2BCB7@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox