Skip to content

Commit cdafb93

Browse files
Fabian Frederickjohnstultz-work
authored andcommitted
ntp: Convert simple_strtol to kstrtol
Replace obsolete function simple_strtol w/ kstrtol Inspired-By: Andrew Morton <akpm@linux-foundation.org> Cc: John Stultz <john.stultz@linaro.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Fabian Frederick <fabf@skynet.be> [jstultz: Tweak commit message] Signed-off-by: John Stultz <john.stultz@linaro.org>
1 parent c04ae71 commit cdafb93

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎kernel/time/ntp.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,10 @@ void __hardpps(const struct timespec *phase_ts, const struct timespec *raw_ts)
923923

924924
static int __init ntp_tick_adj_setup(char *str)
925925
{
926-
ntp_tick_adj = simple_strtol(str, NULL, 0);
926+
int rc = kstrtol(str, 0, (long *)&ntp_tick_adj);
927+
928+
if (rc)
929+
return rc;
927930
ntp_tick_adj <<= NTP_SCALE_SHIFT;
928931

929932
return 1;

0 commit comments

Comments
 (0)