summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2024-03-25 08:40:16 +0200
committerThomas Gleixner <tglx@linutronix.de>2024-04-08 15:03:07 +0200
commit670be12ba8f5d20ee2fb0531be6977005cd62401 (patch)
treeaebb55f17e298b2aae413346a40fd93565371c68 /kernel
parent9af4548e828aa2ea66f54433c5747f64124a6240 (diff)
downloadlinux-670be12ba8f5d20ee2fb0531be6977005cd62401.tar.gz
linux-670be12ba8f5d20ee2fb0531be6977005cd62401.tar.bz2
linux-670be12ba8f5d20ee2fb0531be6977005cd62401.zip
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
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/timekeeping.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index c698219b152d..f81d675291e0 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -391,10 +391,7 @@ static inline u64 timekeeping_cycles_to_ns(const struct tk_read_base *tkr, u64 c
static __always_inline u64 __timekeeping_get_ns(const struct tk_read_base *tkr)
{
- u64 delta, cycles = tk_clock_read(tkr);
-
- delta = clocksource_delta(cycles, tkr->cycle_last, tkr->mask);
- return timekeeping_delta_to_ns(tkr, delta);
+ return timekeeping_cycles_to_ns(tkr, tk_clock_read(tkr));
}
static inline u64 timekeeping_get_ns(const struct tk_read_base *tkr)