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.

timekeeping: Reuse timekeeping_cycles_to_ns()

Simplify __timekeeping_get_ns() by reusing timekeeping_cycles_to_ns().

No functional change.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240325064023.2997-13-adrian.hunter@intel.com

authored by

Adrian Hunter and committed by
Thomas Gleixner
670be12b 9af4548e

+1 -4
+1 -4
kernel/time/timekeeping.c
··· 391 391 392 392 static __always_inline u64 __timekeeping_get_ns(const struct tk_read_base *tkr) 393 393 { 394 - u64 delta, cycles = tk_clock_read(tkr); 395 - 396 - delta = clocksource_delta(cycles, tkr->cycle_last, tkr->mask); 397 - return timekeeping_delta_to_ns(tkr, delta); 394 + return timekeeping_cycles_to_ns(tkr, tk_clock_read(tkr)); 398 395 } 399 396 400 397 static inline u64 timekeeping_get_ns(const struct tk_read_base *tkr)