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: Move store of next event into __next_timer_interrupt()

Both call sites of __next_timer_interrupt() store the return value directly
in base->next_expiry. Move the store into __next_timer_interrupt() and to
make its purpose more clear, rename the function to next_expiry_recalc().

No functional change.

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

authored by

Anna-Maria Behnsen and committed by
Thomas Gleixner
b5e6f598 d124c339

+6 -5
+6 -5
kernel/time/timer.c
··· 1800 1800 /* 1801 1801 * Search the first expiring timer in the various clock levels. Caller must 1802 1802 * hold base->lock. 1803 + * 1804 + * Store next expiry time in base->next_expiry. 1803 1805 */ 1804 - static unsigned long __next_timer_interrupt(struct timer_base *base) 1806 + static void next_expiry_recalc(struct timer_base *base) 1805 1807 { 1806 1808 unsigned long clk, next, adj; 1807 1809 unsigned lvl, offset = 0; ··· 1869 1867 clk += adj; 1870 1868 } 1871 1869 1870 + base->next_expiry = next; 1872 1871 base->next_expiry_recalc = false; 1873 1872 base->timers_pending = !(next == base->clk + NEXT_TIMER_MAX_DELTA); 1874 - 1875 - return next; 1876 1873 } 1877 1874 1878 1875 #ifdef CONFIG_NO_HZ_COMMON ··· 1931 1930 1932 1931 raw_spin_lock(&base->lock); 1933 1932 if (base->next_expiry_recalc) 1934 - base->next_expiry = __next_timer_interrupt(base); 1933 + next_expiry_recalc(base); 1935 1934 nextevt = base->next_expiry; 1936 1935 1937 1936 /* ··· 2022 2021 WARN_ON_ONCE(!levels && !base->next_expiry_recalc 2023 2022 && base->timers_pending); 2024 2023 base->clk++; 2025 - base->next_expiry = __next_timer_interrupt(base); 2024 + next_expiry_recalc(base); 2026 2025 2027 2026 while (levels--) 2028 2027 expire_timers(base, heads + levels);