ntp: Change time_reftime to time64_t and utilize 64bit __ktime_get_real_seconds
authorDengChao <chao.deng@linaro.org>
Sun, 13 Dec 2015 04:24:19 +0000 (12:24 +0800)
committerJohn Stultz <john.stultz@linaro.org>
Thu, 17 Dec 2015 00:50:55 +0000 (16:50 -0800)
commit0af864651b459afb0435ee8786a19cbe5a044cdb
tree9be604ee45f8f9ef891c5dd1783b2b6b2d2bb463
parentdee3665416a8553279d10b62b5e62685cbe5daa8
ntp: Change time_reftime to time64_t and utilize 64bit __ktime_get_real_seconds

The type of static variant "time_reftime" and the call of
get_seconds in ntp are both not y2038 safe.

So change the type of time_reftime to time64_t and replace
get_seconds with __ktime_get_real_seconds.

The local variant "secs" in ntp_update_offset represents
seconds between now and last ntp adjustment, it seems impossible
that this time will last more than 68 years, so keep its type as
"long".

Reviewed-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: DengChao <chao.deng@linaro.org>
[jstultz: Tweaked commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org>
kernel/time/ntp.c