Skip to content

Commit

Permalink
ntp: Use kstrtos64 for s64 variable
Browse files Browse the repository at this point in the history
...instead of kstrtol with a dirty cast.

Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Miroslav Lichvar <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Prarit Bhargava <[email protected]>
Cc: Stephen Boyd <[email protected]>
Signed-off-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: John Stultz <[email protected]>
  • Loading branch information
WOnder93 authored and johnstultz-work committed Jul 19, 2018
1 parent 0f9987b commit 86b2dcd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions kernel/time/ntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 86b2dcd

Please sign in to comment.