Skip to content

Commit 86b2dcd

Browse files
Ondrej Mosnacekjohnstultz-work
authored andcommitted
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>
1 parent 0f9987b commit 86b2dcd

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎kernel/time/ntp.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,12 +1020,11 @@ void __hardpps(const struct timespec64 *phase_ts, const struct timespec64 *raw_t
10201020

10211021
static int __init ntp_tick_adj_setup(char *str)
10221022
{
1023-
int rc = kstrtol(str, 0, (long *)&ntp_tick_adj);
1024-
1023+
int rc = kstrtos64(str, 0, &ntp_tick_adj);
10251024
if (rc)
10261025
return rc;
1027-
ntp_tick_adj <<= NTP_SCALE_SHIFT;
10281026

1027+
ntp_tick_adj <<= NTP_SCALE_SHIFT;
10291028
return 1;
10301029
}
10311030

0 commit comments

Comments
 (0)