Skip to content

Commit 670be12

Browse files
ahunter6KAGA-KOKO
authored andcommitted
timekeeping: Reuse timekeeping_cycles_to_ns()
Simplify __timekeeping_get_ns() by reusing timekeeping_cycles_to_ns(). No functional change. Suggested-by: Thomas Gleixner <[email protected]> Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 9af4548 commit 670be12

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

kernel/time/timekeeping.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,10 +391,7 @@ static inline u64 timekeeping_cycles_to_ns(const struct tk_read_base *tkr, u64 c
391391

392392
static __always_inline u64 __timekeeping_get_ns(const struct tk_read_base *tkr)
393393
{
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));
398395
}
399396

400397
static inline u64 timekeeping_get_ns(const struct tk_read_base *tkr)

0 commit comments

Comments
 (0)