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 1/5] powercap: arm_scmi_powercap: Log number of powercap domains
Date: Thu, 14 May 2026 07:36:39 +0000	[thread overview]
Message-ID: <20260514073639.997DDC2BCB7@smtp.kernel.org> (raw)
In-Reply-To: <20260513-scmi-client-probe-log-v1-1-00b47b1be009@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] Misleading and redundant log message introduced during probe.
- [Low] Incorrect format specifier used for an unsigned integer.
--

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

powercap: arm_scmi_powercap: Log number of powercap domains

The SCMI powercap driver does not currently report how many powercap
domains were discovered from firmware during probe. This commit adds a log
message indicating the powercap domain count after a successful probe.

> diff --git a/drivers/powercap/arm_scmi_powercap.c b/drivers/powercap/arm_scmi_powercap.c
> index ab66e9a3b1e2c..48d721385f946 100644
> --- a/drivers/powercap/arm_scmi_powercap.c
> +++ b/drivers/powercap/arm_scmi_powercap.c
> @@ -496,6 +496,7 @@ static int scmi_powercap_probe(struct scmi_device *sdev)
>  		return ret;
>  
>  	dev_set_drvdata(dev, pr);
> +	dev_info(dev, "Initialized %d powercap domains\n", pr->num_zones);

Before this line, scmi_zones_register() is called, which already logs the
number of successfully registered domains:

    dev_info(dev, "Registered %d SCMI Powercap domains !\n", reg_zones);

Does this new dev_info() call create redundant and potentially conflicting
output in the kernel ring buffer?

Additionally, scmi_powercap_probe() explicitly skips domains with abstract
power scales earlier in the function:

    if (!spz->info->powercap_scale_uw &&
        !spz->info->powercap_scale_mw) {
        dev_warn(dev,
                 "Abstract power scale not supported. Skip %s.\n",
                 spz->info->name);
        spz->invalid = true;
        continue;
    }

Because pr->num_zones represents the total discovered domains rather than
the number actually initialized, could the count in the new log message be
misleading?

Finally, pr->num_zones is defined as an unsigned int in
struct scmi_powercap_root. Should the format specifier be %u instead of %d
to ensure type correctness?

>  
>  	return ret;
>  }

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

  reply	other threads:[~2026-05-14  7:36 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 [this message]
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
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=20260514073639.997DDC2BCB7@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