* [PATCH] procfs: uptime: use ktime_get_boottime_ts64
@ 2018-06-20 8:17 Arnd Bergmann
2018-06-20 8:35 ` Thomas Gleixner
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2018-06-20 8:17 UTC (permalink / raw)
To: Al Viro, Andrew Morton
Cc: y2038, Arnd Bergmann, Thomas Gleixner, Deepa Dinamani, linux-kernel
get_monotonic_boottime() is deprecated and uses the old timespec
type. Let's convert /proc/uptime to use ktime_get_boottime_ts64().
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
fs/proc/uptime.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c
index 3f723cb478af..a4c2791ab70b 100644
--- a/fs/proc/uptime.c
+++ b/fs/proc/uptime.c
@@ -9,7 +9,7 @@
static int uptime_proc_show(struct seq_file *m, void *v)
{
- struct timespec uptime;
+ struct timespec64 uptime;
struct timespec64 idle;
u64 nsec;
u32 rem;
@@ -19,7 +19,7 @@ static int uptime_proc_show(struct seq_file *m, void *v)
for_each_possible_cpu(i)
nsec += (__force u64) kcpustat_cpu(i).cpustat[CPUTIME_IDLE];
- get_monotonic_boottime(&uptime);
+ ktime_get_boottime_ts64(&uptime);
idle.tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem);
idle.tv_nsec = rem;
seq_printf(m, "%lu.%02lu %lu.%02lu\n",
--
2.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-20 8:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-20 8:17 [PATCH] procfs: uptime: use ktime_get_boottime_ts64 Arnd Bergmann
2018-06-20 8:35 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).