Re: [patch 10/12] power: supply: charger-manager: Switch to alarmtimer_start()

From: Peter Zijlstra

Date: Tue Apr 07 2026 - 06:11:27 EST


On Tue, Apr 07, 2026 at 10:55:03AM +0200, Thomas Gleixner wrote:

> + exp = ktime_set(wakeup_ms / MSEC_PER_SEC,
> (wakeup_ms % MSEC_PER_SEC) * NSEC_PER_MSEC);

Surely we can write this less insane?

exp = wakeup_ms * NSEC_PER_MSEC;

comes to mind? And yes, we then seem to loose that KTIME_SEC_MAX check,
but urgh.