The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* Re: [patch V2 01/11] hrtimer: Provide hrtimer_start_range_ns_user()
       [not found] ` <20260408114951.995031895@kernel.org>
@ 2026-05-12  8:06   ` Dan Carpenter
  2026-05-13 12:57     ` Thomas Gleixner
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2026-05-12  8:06 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Calvin Owens, Anna-Maria Behnsen, Frederic Weisbecker,
	Peter Zijlstra (Intel), John Stultz, Stephen Boyd, Alexander Viro,
	Christian Brauner, Jan Kara, linux-fsdevel, Sebastian Reichel,
	linux-pm, Pablo Neira Ayuso, Florian Westphal, Phil Sutter,
	netfilter-devel, coreteam

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch V2 01/11] hrtimer: Provide hrtimer_start_range_ns_user()
  2026-05-12  8:06   ` [patch V2 01/11] hrtimer: Provide hrtimer_start_range_ns_user() Dan Carpenter
@ 2026-05-13 12:57     ` Thomas Gleixner
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Gleixner @ 2026-05-13 12:57 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: LKML, Calvin Owens, Anna-Maria Behnsen, Frederic Weisbecker,
	Peter Zijlstra (Intel), John Stultz, Stephen Boyd, Alexander Viro,
	Christian Brauner, Jan Kara, linux-fsdevel, Sebastian Reichel,
	linux-pm, Pablo Neira Ayuso, Florian Westphal, Phil Sutter,
	netfilter-devel, coreteam

On Tue, May 12 2026 at 11:06, Dan Carpenter wrote:
> 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.

Duh, yes.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-13 12:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260408102356.783133335@kernel.org>
     [not found] ` <20260408114951.995031895@kernel.org>
2026-05-12  8:06   ` [patch V2 01/11] hrtimer: Provide hrtimer_start_range_ns_user() Dan Carpenter
2026-05-13 12:57     ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox