Skip to content

Commit 7a39a50

Browse files
anna-marialxKAGA-KOKO
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Frederic Weisbecker <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 1e49048 commit 7a39a50

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

kernel/time/timer.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1939,15 +1939,9 @@ u64 get_next_timer_interrupt(unsigned long basej, u64 basem)
19391939

19401940
/*
19411941
* 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.
19441943
*/
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);
19511945

19521946
if (time_before_eq(nextevt, basej)) {
19531947
expires = basem;

0 commit comments

Comments
 (0)