Re: [patch V2 01/11] hrtimer: Provide hrtimer_start_range_ns_user()
From: Dan Carpenter
Date: Tue May 12 2026 - 04:15:33 EST
On Wed, Apr 08, 2026 at 01:53:46PM +0200, Thomas Gleixner wrote:
> +enum {
> + HRTIMER_REPROGRAM_NONE,
> + HRTIMER_REPROGRAM,
> + HRTIMER_REPROGRAM_FORCE,
> +};
> +
> static bool __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, u64 delta_ns,
> const enum hrtimer_mode mode, struct hrtimer_clock_base *base)
The return type for this function needs to changed from bool to
enum whatever... Otherwise HRTIMER_REPROGRAM and HRTIMER_REPROGRAM_FORCE
are both just true.
> {
> @@ -1410,7 +1416,7 @@ static bool __hrtimer_start_range_ns(str
> /* If a deferred rearm is pending skip reprogramming the device */
> if (cpu_base->deferred_rearm) {
> cpu_base->deferred_needs_update = true;
> - return false;
> + return HRTIMER_REPROGRAM_NONE;
> }
>
> if (!was_first || cpu_base != this_cpu_base) {
> @@ -1423,7 +1429,7 @@ static bool __hrtimer_start_range_ns(str
> * callbacks.
> */
> if (likely(hrtimer_base_is_online(this_cpu_base)))
> - return first;
> + return first ? HRTIMER_REPROGRAM : HRTIMER_REPROGRAM_NONE;
regards,
dan carpenter