Re: [PATCH] hwmon: (aht10) Fix update_interval overflow on 64-bit

From: Guenter Roeck

Date: Mon Nov 09 2026 - 13:52:09 EST


On Sun, Nov 08, 2026 at 07:26:51PM +0200, Rupesh Majhi wrote:
> On 64-bit, update_interval writes are clamped to LONG_MAX ms, but
> ms_to_ktime() overflows above 9223372036854 ms and the interval wraps.
> LONG_MAX becomes -1 ms, so every read starts a new measurement and
> update_interval reads back -1.
>
> Clamp to INT_MAX like sht4x, so the limit is the same on all platforms.
>
> Fixes: 8c78f0dee437 ("hwmon: Add AHT10 Temperature and Humidity Sensor Driver")
> Signed-off-by: Rupesh Majhi <zoone.rupert@xxxxxxxxx>

Applied.

Thanks,
Guenter