Re: [patch 02/12] hrtimer: Provide hrtimer_start_range_ns_user()

Thomas Gleixner
2026-04-07T11:32:33Z

On Tue, Apr 07 2026 at 11:54, Peter Zijlstra wrote:
> On Tue, Apr 07, 2026 at 10:54:22AM +0200, Thomas Gleixner wrote:
>> - if (__hrtimer_start_range_ns(timer, tim, delta_ns, mode, base))
>> + switch (hrtimer_start_range_ns_common(timer, tim, delta_ns, mode, base)) {
>> + case HRTIMER_REPROGRAM:
>> hrtimer_reprogram(timer, true);
>> + break;
>> + case HRTIMER_REPROGRAM_FORCE:
>> + hrtimer_force_reprogram(timer->base->cpu_base, 1);
>> + break;
>> + }
>>
>> unlock_hrtimer_base(timer, &flags);
>> }
>
> Something is going to figure out that hrtimer_start_range_ns_common() is
> really returning that enum and then complain you don't handle NONE :-)

:)

> Anyway, to me it would make sense to instead pass that value to
> hrtimer_reprogram() as the second argument. But this works I suppose.

I can do that too. Splitting it this way made me more comfortable to
validate the logic I was implementing.