Re: [PATCH v3] hwmon: (cros_ec) Avoid threshold temperature conversion overflows
From: Guenter Roeck
Date: Thu Jul 30 2026 - 12:55:20 EST
On Thu, Jul 30, 2026 at 05:12:26PM +0200, Thomas Weißschuh wrote:
> If the EC returns non-sensical values the temperature conversions might
> overflow on 32-bit systems.
>
> As these values wouldn't make sense, clamp them to 255 degrees celsius.
> The machine would die before reaching that limit anyways.
>
> Suggested-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> Link: https://lore.kernel.org/lkml/0fbf7f69-bb90-4209-b9d5-258759711496@xxxxxxxxxxxx/
> Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
Applied.
Thanks,
Guenter