[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180713120642.22147-2-omosnace@redhat.com>
Date: Fri, 13 Jul 2018 14:06:41 +0200
From: Ondrej Mosnacek <omosnace@...hat.com>
To: Thomas Gleixner <tglx@...utronix.de>,
John Stultz <john.stultz@...aro.org>
Cc: Stephen Boyd <sboyd@...nel.org>, linux-kernel@...r.kernel.org,
Ondrej Mosnacek <omosnace@...hat.com>
Subject: [PATCH 2/3] ntp: Use kstrtos64 for s64 variable
...instead of kstrtol with a dirty cast.
Signed-off-by: Ondrej Mosnacek <omosnace@...hat.com>
---
kernel/time/ntp.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 25031ffb5d25..6c764addef3e 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -1020,12 +1020,11 @@ void __hardpps(const struct timespec64 *phase_ts, const struct timespec64 *raw_t
static int __init ntp_tick_adj_setup(char *str)
{
- int rc = kstrtol(str, 0, (long *)&ntp_tick_adj);
-
+ int rc = kstrtos64(str, 0, &ntp_tick_adj);
if (rc)
return rc;
- ntp_tick_adj <<= NTP_SCALE_SHIFT;
+ ntp_tick_adj <<= NTP_SCALE_SHIFT;
return 1;
}
--
2.17.1
Powered by blists - more mailing lists