Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

timers: Use already existing function for forwarding timer base

There is an already existing function for forwarding the timer
base. Forwarding the timer base is implemented directly in
get_next_timer_interrupt() as well.

Remove the code duplication and invoke __forward_timer_base() instead.

Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lore.kernel.org/r/20231201092654.34614-11-anna-maria@linutronix.de

authored by

Anna-Maria Behnsen and committed by
Thomas Gleixner
7a39a508 1e490484

+2 -8
+2 -8
kernel/time/timer.c
··· 1939 1939 1940 1940 /* 1941 1941 * We have a fresh next event. Check whether we can forward the 1942 - * base. We can only do that when @basej is past base->clk 1943 - * otherwise we might rewind base->clk. 1942 + * base. 1944 1943 */ 1945 - if (time_after(basej, base->clk)) { 1946 - if (time_after(nextevt, basej)) 1947 - base->clk = basej; 1948 - else if (time_after(nextevt, base->clk)) 1949 - base->clk = nextevt; 1950 - } 1944 + __forward_timer_base(base, basej); 1951 1945 1952 1946 if (time_before_eq(nextevt, basej)) { 1953 1947 expires = basem;