From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755059AbbCLRmV (ORCPT ); Thu, 12 Mar 2015 13:42:21 -0400 Received: from mail-we0-f182.google.com ([74.125.82.182]:43254 "EHLO mail-we0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754606AbbCLRmR (ORCPT ); Thu, 12 Mar 2015 13:42:17 -0400 Date: Thu, 12 Mar 2015 18:42:14 +0100 From: Frederic Weisbecker To: John Stultz Cc: lkml , Arnd Bergmann , Rik van Riel Subject: Re: [RFC][PATCH] uptime: Convert uptime to use 64bit time accessor Message-ID: <20150312174213.GA18985@lerouge> References: <1426181057-2506-1-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1426181057-2506-1-git-send-email-john.stultz@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 12, 2015 at 10:24:17AM -0700, John Stultz wrote: > Convert the uptime output to use the timespec64 structure. That looks correct but the changelog lacks a reason :-) > Cc: Arnd Bergmann > Cc: Rik van Riel > Cc: Frederic Weisbecker > Signed-off-by: John Stultz > --- > fs/proc/uptime.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c > index 33de567..a0b262f 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 timespec idle; > u64 idletime; > u64 nsec; > @@ -20,12 +20,12 @@ static int uptime_proc_show(struct seq_file *m, void *v) > for_each_possible_cpu(i) > idletime += (__force u64) kcpustat_cpu(i).cpustat[CPUTIME_IDLE]; > > - get_monotonic_boottime(&uptime); > + get_monotonic_boottime64(&uptime); > nsec = cputime64_to_jiffies64(idletime) * TICK_NSEC; > idle.tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem); > idle.tv_nsec = rem; > - seq_printf(m, "%lu.%02lu %lu.%02lu\n", > - (unsigned long) uptime.tv_sec, > + seq_printf(m, "%llu.%02lu %lu.%02lu\n", > + (unsigned long long) uptime.tv_sec, > (uptime.tv_nsec / (NSEC_PER_SEC / 100)), > (unsigned long) idle.tv_sec, > (idle.tv_nsec / (NSEC_PER_SEC / 100))); > -- > 1.9.1 >