History

hrtimer: Remove unused next_timer argument from __hrtimer_reprogram()

__hrtimer_reprogram() takes a @next_timer argument but never references it; it only stores @expires_next into cpu_base->expires_next and reprograms the clock event device. The argument has been unused since commit b14bca97c9f5 ("hrtimer: Consolidate reprogramming code"). Drop it and update the two callers. No functional change.

Zhan Xusheng committed 4 months ago

Commit d8966ca1 parent e2904dd1 file · +3 −3Browse files

Showing the changes to kernel/time/hrtimer.c (1 of 1 file). Show all

Unified · Split

kernel/time/hrtimer.c+3−3
@@ -707,7 +707,7 @@ static inline void hrtimer_rearm_event(ktime_t expires_next, bool deferred) · 706 unmodified lines
707707 tick_program_event(expires_next, 1);
708708 }
709709
710−static void __hrtimer_reprogram(struct hrtimer_cpu_base *cpu_base, struct hrtimer *next_timer,
710+static void __hrtimer_reprogram(struct hrtimer_cpu_base *cpu_base,
711711 ktime_t expires_next)
712712 {
713713 cpu_base->expires_next = expires_next;
@@ -743,7 +743,7 @@ static void hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, bool skip · 29 unmodified lines
743743 if (skip_equal && expires_next == cpu_base->expires_next)
744744 return;
745745
746− __hrtimer_reprogram(cpu_base, cpu_base->next_timer, expires_next);
746+ __hrtimer_reprogram(cpu_base, expires_next);
747747 }
748748
749749 /* High resolution timer related functions */
@@ -896,7 +896,7 @@ static void hrtimer_reprogram(struct hrtimer *timer, bool reprogram) · 146 unmodified lines
896896
897897 cpu_base->next_timer = timer;
898898
899− __hrtimer_reprogram(cpu_base, timer, expires);
899+ __hrtimer_reprogram(cpu_base, expires);
900900 }
901901
902902 static bool update_needs_ipi(struct hrtimer_cpu_base *cpu_base, unsigned int active)