From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
y2038@lists.linaro.org,
Dominik Brodowski <linux@dominikbrodowski.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sysinfo: remove get_monotonic_boottime()
Date: Mon, 18 Jun 2018 18:18:05 +0300 [thread overview]
Message-ID: <20180618151805.GC1998@uranus.lan> (raw)
In-Reply-To: <20180618150114.849216-1-arnd@arndb.de>
On Mon, Jun 18, 2018 at 05:00:38PM +0200, Arnd Bergmann wrote:
> 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>
> ---
> kernel/sys.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/sys.c b/kernel/sys.c
> index ccaeffa2171b..24f838da8ca1 100644
> --- a/kernel/sys.c
> +++ b/kernel/sys.c
> @@ -2574,11 +2574,11 @@ static int do_sysinfo(struct sysinfo *info)
> {
> unsigned long mem_total, sav_total;
> unsigned int mem_unit, bitcount;
> - struct timespec tp;
> + struct timespec64 tp;
>
> memset(info, 0, sizeof(struct sysinfo));
>
> - get_monotonic_boottime(&tp);
> + ktime_get_boottime_ts64(&tp);
> info->uptime = tp.tv_sec + (tp.tv_nsec ? 1 : 0);
>
> get_avenrun(info->loads, 0, SI_LOAD_SHIFT - FSHIFT);
The change is pretty obvious. Looks ok to me (though I missed
the moment when timespec became old ;)
Reviewed-by: Cyrill Gorcunov <gorcunov@gmail.com>
next prev parent reply other threads:[~2018-06-18 15:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-18 15:00 [PATCH] sysinfo: remove get_monotonic_boottime() Arnd Bergmann
2018-06-18 15:18 ` Cyrill Gorcunov [this message]
2018-06-19 8:02 ` [tip:timers/core] sysinfo: Remove get_monotonic_boottime() tip-bot for Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180618151805.GC1998@uranus.lan \
--to=gorcunov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=tglx@linutronix.de \
--cc=y2038@lists.linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.