Re: [PATCH v2 2/3] iio: adc: versal-sysmon: validate temperature hysteresis

From: Arnav Kapoor

Date: Mon Nov 30 2026 - 10:01:15 EST


On Mon, Nov 30, 2026 at 03:49:36PM +0530, Amit Kumar Mahapatra wrote:
> The hysteresis written through sysfs is only checked for being negative.
> A large value makes upper_mc - hysteresis in sysmon_update_temp_lower()
> overflow before it is clamped.

Reviewed-by: Arnav Kapoor <kapoorarnav43@xxxxxxxxx>

Not for this series: write_event_value() ignores val2, so with the
default IIO_VAL_INT_PLUS_MICRO format a hysteresis of -0.5 is accepted
as 0. Might be worth a separate follow-up rejecting val2 != 0, as
Jonathan suggested for sx9324 [1].

[1] https://lore.kernel.org/linux-iio/20261130003945.0afa767e@jic23-hlaptop/