diff options
author | Ondrej Mosnacek <omosnace@redhat.com> | 2018-07-13 08:06:41 -0400 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2018-07-19 17:58:37 -0400 |
commit | 86b2dcd4f02b86f6b5927fc0adcac777825f4030 (patch) | |
tree | 4396153b634bb5e6dc0594ddd9c3a90a2e991e0a /kernel/time/ntp.c | |
parent | 0f9987b63dcc68606b82a349bbb2016b392a2c34 (diff) |
ntp: Use kstrtos64 for s64 variable
...instead of kstrtol with a dirty cast.
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Miroslav Lichvar <mlichvar@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'kernel/time/ntp.c')
-rw-r--r-- | kernel/time/ntp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index 3eddac25675f..a627cae8baab 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 | |||
1020 | 1020 | ||
1021 | static int __init ntp_tick_adj_setup(char *str) | 1021 | static int __init ntp_tick_adj_setup(char *str) |
1022 | { | 1022 | { |
1023 | int rc = kstrtol(str, 0, (long *)&ntp_tick_adj); | 1023 | int rc = kstrtos64(str, 0, &ntp_tick_adj); |
1024 | |||
1025 | if (rc) | 1024 | if (rc) |
1026 | return rc; | 1025 | return rc; |
1027 | ntp_tick_adj <<= NTP_SCALE_SHIFT; | ||
1028 | 1026 | ||
1027 | ntp_tick_adj <<= NTP_SCALE_SHIFT; | ||
1029 | return 1; | 1028 | return 1; |
1030 | } | 1029 | } |
1031 | 1030 | ||