lkml.org 
[lkml]   [2014]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/1] kernel/time/ntp.c: convert simple_strtol to kstrtol
From
On Fri, May 9, 2014 at 11:14 AM, Fabian Frederick <fabf@skynet.be> wrote:
>

Commit message missing. Mind adding a brief description of why this
change is worth making?

> 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>
> ---
> kernel/time/ntp.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
> index 419a52c..82b7c9e 100644
> --- a/kernel/time/ntp.c
> +++ b/kernel/time/ntp.c
> @@ -923,7 +923,10 @@ void __hardpps(const struct timespec *phase_ts, const struct timespec *raw_ts)
>
> static int __init ntp_tick_adj_setup(char *str)
> {
> - ntp_tick_adj = simple_strtol(str, NULL, 0);
> + int rc = kstrtol(str, 0, (long *)&ntp_tick_adj);
> +
> + if (rc)
> + return rc;
> ntp_tick_adj <<= NTP_SCALE_SHIFT;
>
> return 1;
> --
> 1.8.4.5
>

thanks
-john


\
 
 \ /
  Last update: 2014-05-09 21:01    [W:0.034 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site