* [PATCH] sysinfo: remove get_monotonic_boottime()
@ 2018-06-18 15:00 Arnd Bergmann
2018-06-18 15:18 ` Cyrill Gorcunov
2018-06-19 8:02 ` [tip:timers/core] sysinfo: Remove get_monotonic_boottime() tip-bot for Arnd Bergmann
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2018-06-18 15:00 UTC (permalink / raw)
To: Andrew Morton, Thomas Gleixner
Cc: y2038, Arnd Bergmann, Dominik Brodowski, Cyrill Gorcunov, linux-kernel
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);
--
2.9.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] sysinfo: remove get_monotonic_boottime()
2018-06-18 15:00 [PATCH] sysinfo: remove get_monotonic_boottime() Arnd Bergmann
@ 2018-06-18 15:18 ` Cyrill Gorcunov
2018-06-19 8:02 ` [tip:timers/core] sysinfo: Remove get_monotonic_boottime() tip-bot for Arnd Bergmann
1 sibling, 0 replies; 3+ messages in thread
From: Cyrill Gorcunov @ 2018-06-18 15:18 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Andrew Morton, Thomas Gleixner, y2038, Dominik Brodowski, linux-kernel
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:timers/core] sysinfo: Remove get_monotonic_boottime()
2018-06-18 15:00 [PATCH] sysinfo: remove get_monotonic_boottime() Arnd Bergmann
2018-06-18 15:18 ` Cyrill Gorcunov
@ 2018-06-19 8:02 ` tip-bot for Arnd Bergmann
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Arnd Bergmann @ 2018-06-19 8:02 UTC (permalink / raw)
To: linux-tip-commits
Cc: tglx, gorcunov, mingo, gorcunov, linux-kernel, hpa, akpm, linux, arnd
Commit-ID: dc1b7b6ca9d5fa905c164a667086d8a3d8605875
Gitweb: https://git.kernel.org/tip/dc1b7b6ca9d5fa905c164a667086d8a3d8605875
Author: Arnd Bergmann <arnd@arndb.de>
AuthorDate: Mon, 18 Jun 2018 17:00:38 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 19 Jun 2018 09:56:27 +0200
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
---
kernel/sys.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sys.c b/kernel/sys.c
index 38509dc1f77b..e27b51d3facd 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -2512,11 +2512,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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-06-19 8:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-18 15:00 [PATCH] sysinfo: remove get_monotonic_boottime() Arnd Bergmann
2018-06-18 15:18 ` Cyrill Gorcunov
2018-06-19 8:02 ` [tip:timers/core] sysinfo: Remove get_monotonic_boottime() tip-bot for Arnd Bergmann
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).