Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sergio Melas" <sergiomelas@gmail.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v2] hwmon: (yogafan) Add support for new Lenovo models
Date: Tue, 08 Sep 2026 09:55:44 +0000	[thread overview]
Message-ID: <20260908095545.2CDDA1F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260908094717.2224803-1-sergiomelas@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Redundant DMI quirk entry for 'Yoga 14cACN 2021'
--

commit 634b305e1f54cec1238a122131d8de1e78a97b9f
Author: Sergio Melas <sergiomelas@gmail.com>
hwmon: (yogafan) Add support for new Lenovo models

This commit adds DMI quirk entries to map the correct ACPI paths and
configurations for new Lenovo laptop models. It maps specific configurations
for Yoga 14cACN 2021, IdeaPad 3 15ALC6 Ub, and Yoga 740-15IML models based
on DMI product family matching.

> diff --git a/drivers/hwmon/yogafan.c b/drivers/hwmon/yogafan.c
> index 48fa5148d9e2c..2f86a8f6e0aeb 100644
> --- a/drivers/hwmon/yogafan.c
> +++ b/drivers/hwmon/yogafan.c

[ ... ]

> @@ -189,6 +194,30 @@ static const struct hwmon_chip_info yoga_fan_chip_info = {
>  };
>  
>  static const struct dmi_system_id yogafan_quirks[] = {

[ ... ]

> +	{
> +		.ident = "Yoga 14cACN 2021",
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> +			DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 14cACN 2021"),
> +		},
> +		.driver_data = (void *)&yoga_8bit_fans_cfg,
> +	},

[Severity: Low]
Is this explicit entry for the Yoga 14cACN 2021 necessary?

Looking further down in the yogafan_quirks array, there is a generic fallback
match for Lenovo Yoga devices:

static const struct dmi_system_id yogafan_quirks[] = {
    ...
    {
        .ident = "Lenovo Yoga",
        .matches = {
            DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
            DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga"),
        },
        .driver_data = (void *)&yoga_8bit_fans_cfg,
    },
    ...
};

Since dmi_first_match() performs substring matching, and the generic fallback
maps to the exact same yoga_8bit_fans_cfg configuration, won't omitting this
new block naturally fall through to the correct behavior without adding
redundant entries to the array?

>  	{
>  		.ident = "Lenovo LOQ 15IAX9",

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

  reply	other threads:[~2026-09-08  9:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08  9:47 [PATCH v2] hwmon: (yogafan) Add support for new Lenovo models Sergio Melas
2026-09-08  9:55 ` sashiko-bot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-09-08  9:49 Sergio Melas
2026-09-08  9:59 ` sashiko-bot
2026-09-08 16:33 ` Guenter Roeck

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=20260908095545.2CDDA1F00A3D@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=sergiomelas@gmail.com \
    /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