Skip to content

Commit dc1b7b6

Browse files
arndbKAGA-KOKO
authored andcommitted
sysinfo: Remove get_monotonic_boottime()
get_monotonic_boottime() is deprecated because it uses the old 'timespec' structure. This replaces one of the last callers with a call to ktime_get_boottime. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Cyrill Gorcunov <gorcunov@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: y2038@lists.linaro.org Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Link: https://lkml.kernel.org/r/20180618150114.849216-1-arnd@arndb.de
1 parent 58a1045 commit dc1b7b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/sys.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2512,11 +2512,11 @@ static int do_sysinfo(struct sysinfo *info)
25122512
{
25132513
unsigned long mem_total, sav_total;
25142514
unsigned int mem_unit, bitcount;
2515-
struct timespec tp;
2515+
struct timespec64 tp;
25162516

25172517
memset(info, 0, sizeof(struct sysinfo));
25182518

2519-
get_monotonic_boottime(&tp);
2519+
ktime_get_boottime_ts64(&tp);
25202520
info->uptime = tp.tv_sec + (tp.tv_nsec ? 1 : 0);
25212521

25222522
get_avenrun(info->loads, 0, SI_LOAD_SHIFT - FSHIFT);

0 commit comments

Comments
 (0)