Skip to content

Commit 7d2f6ab

Browse files
committed
time: hrtimer: Use timerqueue_iterate_next() to get to the next timer
Use timerqueue_iterate_next() to get to the next timer in __hrtimer_next_event_base() without browsing the timerqueue details diredctly. No intentional changes in functionality. Suggested-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent ff7de62 commit 7d2f6ab

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎kernel/time/hrtimer.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,7 @@ static ktime_t __hrtimer_next_event_base(struct hrtimer_cpu_base *cpu_base,
505505
timer = container_of(next, struct hrtimer, node);
506506
if (timer == exclude) {
507507
/* Get to the next timer in the queue. */
508-
struct rb_node *rbn = rb_next(&next->node);
509-
510-
next = rb_entry_safe(rbn, struct timerqueue_node, node);
508+
next = timerqueue_iterate_next(next);
511509
if (!next)
512510
continue;
513511

0 commit comments

Comments
 (0)