Re: [PATCH] i2c: ocores: Use read_poll_timeout_atomic to avoid false poll timeouts
From: Andrew Lunn
Date: Thu Mar 26 2026 - 20:27:41 EST
On Tue, Mar 24, 2026 at 03:05:56PM +0100, Martin Aberer wrote:
> Replace the manual polling loop in ocores_wait() with the kernel helper
> read_poll_timeout_atomic(). This simplifies the code and ensures robust
> timeout handling. By using this helper, we avoid spurious timeout errors
> that could occur under high CPU load or preemption, as the macro handles
> timing and condition checks atomically.
It is not that it does it atomically, but that it always does a check
after the delay, even if the delay has taken us past the timeout.
Apart from that, and the other comments:
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Andrew