Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Eugene Shalygin" <eugene.shalygin@gmail.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH] hwmon: (asus-ec-sensors) detect unconnected physical sensors
Date: Sat, 11 Jul 2026 10:06:40 +0000	[thread overview]
Message-ID: <20260711100640.B6E951F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260711095917.568925-1-eugene.shalygin@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The static array `temperature_blank_values` is missing the `const` qualifier.
--

--- Patch [1]: [PATCH] hwmon: (asus-ec-sensors) detect unconnected physical sensors ---
commit 674d66473a7b251333e25248978dffdc28c7dbcd
Author: Eugene Shalygin <eugene.shalygin@gmail.com>

hwmon: (asus-ec-sensors) detect unconnected physical sensors

This commit adds detection for unconnected physical temperature sensors by
checking for specific blank values (-62, -60, -40) returned by the EC
register. If a sensor is unconnected, it now returns -ENODATA to hwmon.

> diff --git a/drivers/hwmon/asus-ec-sensors.c b/drivers/hwmon/asus-ec-sensors.c
> index 29a23484cbe7b..f178570110c1d 100644
> --- a/drivers/hwmon/asus-ec-sensors.c
> +++ b/drivers/hwmon/asus-ec-sensors.c
> @@ -67,6 +67,13 @@ static char *mutex_path_override;
>  /* Moniker for the ACPI global lock (':' is not allowed in ASL identifiers) */
>  #define ACPI_GLOBAL_LOCK_PSEUDO_PATH	":GLOBAL_LOCK"
>  
> +/*
> + * The values for temperature sensor readings without physical sensors connected.
> + * The value varies across generations and is seemingly defined by the EC chip
> + * used in the given board.
> + */
> +static s32 temperature_blank_values[] = {-62, -60, -40};

[Severity: Low]
This isn't a bug, but should this array be declared with the const
qualifier? Without it, the array will be placed in the writable data
section rather than the read-only memory section.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260711095917.568925-1-eugene.shalygin@gmail.com?part=1

      reply	other threads:[~2026-07-11 10:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-11  9:59 [PATCH] hwmon: (asus-ec-sensors) detect unconnected physical sensors Eugene Shalygin
2026-07-11 10:06 ` sashiko-bot [this message]

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=20260711100640.B6E951F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=eugene.shalygin@gmail.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