Skip to content

Commit 34aefd2

Browse files
committed
timers: Use already existing function for forwarding timer base
JIRA: https://issues.redhat.com/browse/RHEL-33787 commit 7a39a50 Author: Anna-Maria Behnsen <anna-maria@linutronix.de> Date: Fri Dec 1 10:26:32 2023 +0100 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 Signed-off-by: Phil Auld <pauld@redhat.com>
1 parent 3f6a1a1 commit 34aefd2

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
@@ -1886,15 +1886,9 @@ u64 get_next_timer_interrupt(unsigned long basej, u64 basem)
18861886

18871887
/*
18881888
* We have a fresh next event. Check whether we can forward the
1889-
* base. We can only do that when @basej is past base->clk
1890-
* otherwise we might rewind base->clk.
1889+
* base.
18911890
*/
1892-
if (time_after(basej, base->clk)) {
1893-
if (time_after(nextevt, basej))
1894-
base->clk = basej;
1895-
else if (time_after(nextevt, base->clk))
1896-
base->clk = nextevt;
1897-
}
1891+
__forward_timer_base(base, basej);
18981892

18991893
if (time_before_eq(nextevt, basej)) {
19001894
expires = basem;

0 commit comments

Comments
 (0)