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.

posix-timers: Avoid direct access to hrtimer clockbase

The field timer->base->get_time is a private implementation detail and
should not be accessed outside of the hrtimer core.

Switch to the equivalent helpers.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/all/20250821-hrtimer-cleanup-get_time-v2-1-3ae822e5bfbd@linutronix.de

authored by

Thomas Weißschuh and committed by
Thomas Gleixner
24fb08dc 0a26e5eb

+2 -3
+2 -3
kernel/time/posix-timers.c
··· 299 299 { 300 300 struct hrtimer *timer = &timr->it.real.timer; 301 301 302 - timr->it_overrun += hrtimer_forward(timer, timer->base->get_time(), 303 - timr->it_interval); 302 + timr->it_overrun += hrtimer_forward_now(timer, timr->it_interval); 304 303 hrtimer_restart(timer); 305 304 } 306 305 ··· 824 825 hrtimer_setup(&timr->it.real.timer, posix_timer_fn, timr->it_clock, mode); 825 826 826 827 if (!absolute) 827 - expires = ktime_add_safe(expires, timer->base->get_time()); 828 + expires = ktime_add_safe(expires, hrtimer_cb_get_time(timer)); 828 829 hrtimer_set_expires(timer, expires); 829 830 830 831 if (!sigev_none)