aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-06-21 22:32:47 +0200
committerPaul Gortmaker <paul.gortmaker@windriver.com>2019-09-16 12:21:48 -0400
commit6129763b4364acec4c5dffba2643f60ebd333e7e (patch)
tree243847df167365458717b2fed1bd2f454c435836
parent67eaa743e2c86384f173044a99f8ba4d040a094f (diff)
downloadlinux-yocto-6129763b4364acec4c5dffba2643f60ebd333e7e.tar.gz
linux-yocto-6129763b4364acec4c5dffba2643f60ebd333e7e.tar.bz2
linux-yocto-6129763b4364acec4c5dffba2643f60ebd333e7e.zip
timekeeping: Use proper ktime_add when adding nsecs in coarse offset
commit 0354c1a3cdf31f44b035cfad14d32282e815a572 upstream. While this doesn't actually amount to a real difference, since the macro evaluates to the same thing, every place else operates on ktime_t using these functions, so let's not break the pattern. Fixes: e3ff9c3678b4 ("timekeeping: Repair ktime_get_coarse*() granularity") Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Link: https://lkml.kernel.org/r/20190621203249.3909-1-Jason@zx2c4.com
-rw-r--r--kernel/time/timekeeping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index c63dd4bb9b8d..58936ed15f9f 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -813,7 +813,7 @@ ktime_t ktime_get_coarse_with_offset(enum tk_offsets offs)
} while (read_seqcount_retry(&tk_core.seq, seq));
- return base + nsecs;
+ return ktime_add_ns(base, nsecs);
}
EXPORT_SYMBOL_GPL(ktime_get_coarse_with_offset);