Re: [PATCH 2/4] alarmtimer: Extract alarmtimer_get_next_delta() helper

From: John Stultz

Date: Wed Dec 02 2026 - 14:24:54 EST


On Mon, Nov 30, 2026 at 10:13 PM Samuel Wu <wusamuel@xxxxxxxxxx> wrote:
>
> Add a small helper, alarmtimer_get_next_delta(), that does the lookup of
> the soonest alarm, and returns the delta time to it. Additionally, use
> KTIME_MAX instead of 0 as the sentinel value which means "no alarm queued",
> so expiries of 0 delta can be handled.
>
> Behaviorally, this means that a delta of exactly 0 returned with no RTC
> alarm set. Now, it returns -EBUSY.
>
> Signed-off-by: Samuel Wu <wusamuel@xxxxxxxxxx>

Looks ok to me.

Acked-by: John Stultz <jstultz@xxxxxxxxxx>