All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Guenter Roeck" <linux@roeck-us.net>, linux-hwmon@vger.kernel.org
Subject: Re: [RFT PATCH 2/3] hwmon: (nct6775) Fix swapped temperature tolerance register writes
Date: Tue, 10 Nov 2026 04:19:39 +0000	[thread overview]
Message-ID: <sashiko-outbox-206185@kernel.org> (raw)
In-Reply-To: <20261110035955.3968731-3-linux@roeck-us.net>

> sensor_dev_template_pwm_temp_tolerance uses index 0 (backed by
> REG_FAN_MODE via pwm_update_registers()) while
> sensor_dev_template_pwm_crit_temp_tolerance uses index 1 (backed by
> REG_CRITICAL_TEMP_TOLERANCE). However, store_temp_tolerance() checks
> if (index) with inverted branches.
> 
> As a result, writing to pwm*_temp_tolerance writes the new tolerance to
> REG_CRITICAL_TEMP_TOLERANCE instead of REG_FAN_MODE, while writing to
> pwm*_crit_temp_tolerance updates REG_FAN_MODE with temp_tolerance[0] and
> leaves REG_CRITICAL_TEMP_TOLERANCE unchanged.
> 
> Invert the index check in store_temp_tolerance() so index 0 updates fan
> mode registers via pwm_update_registers() and index 1 writes to
> REG_CRITICAL_TEMP_TOLERANCE.
> 
> Fixes: cdcaeceb74ff ("hwmon: (nct6775) Add support for automatic fan control")
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Link: https://sashiko.dev
> Cc: Anton Lundin <glance@ac2.se>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261110035955.3968731-1-linux@roeck-us.net?part=2


  reply	other threads:[~2026-11-10  4:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  3:59 [RFT PATCH 0/3] hwmon: (nct6775) Fix target temperature and tolerance handling Guenter Roeck
2026-11-10  3:59 ` [RFT PATCH 1/3] hwmon: (nct6775) Fix target temp and tolerance for NCT6106/6116/6126 Guenter Roeck
2026-11-10  4:15   ` sashiko-bot
2026-11-10  5:46     ` Guenter Roeck
2026-11-10  3:59 ` [RFT PATCH 2/3] hwmon: (nct6775) Fix swapped temperature tolerance register writes Guenter Roeck
2026-11-10  4:19   ` sashiko-bot [this message]
2026-11-10  3:59 ` [RFT PATCH 3/3] hwmon: (nct6775) Fix tolerance bitmask when reading REG_FAN_MODE Guenter Roeck
2026-11-10  4:26   ` sashiko-bot

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=sashiko-outbox-206185@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --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.