瀏覽代碼

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>
Rafael J. Wysocki 7 年之前
父節點
當前提交
7d2f6abb40
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      kernel/time/hrtimer.c

+ 1 - 3
kernel/time/hrtimer.c

@@ -505,9 +505,7 @@ static ktime_t __hrtimer_next_event_base(struct hrtimer_cpu_base *cpu_base,
 		timer = container_of(next, struct hrtimer, node);
 		timer = container_of(next, struct hrtimer, node);
 		if (timer == exclude) {
 		if (timer == exclude) {
 			/* Get to the next timer in the queue. */
 			/* Get to the next timer in the queue. */
-			struct rb_node *rbn = rb_next(&next->node);
-
-			next = rb_entry_safe(rbn, struct timerqueue_node, node);
+			next = timerqueue_iterate_next(next);
 			if (!next)
 			if (!next)
 				continue;
 				continue;