[tip:timers/core] ntp: Convert simple_strtol to kstrtol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  cdafb93feb3d0ae3131f631a10f70954c96cbef8
Gitweb:     http://git.kernel.org/tip/cdafb93feb3d0ae3131f631a10f70954c96cbef8
Author:     Fabian Frederick <fabf@xxxxxxxxx>
AuthorDate: Fri, 9 May 2014 20:32:25 +0200
Committer:  John Stultz <john.stultz@xxxxxxxxxx>
CommitDate: Mon, 12 May 2014 10:09:25 -0700

ntp: Convert simple_strtol to kstrtol

Replace obsolete function simple_strtol w/ kstrtol

Inspired-By: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: John Stultz <john.stultz@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
[jstultz: Tweak commit message]
Signed-off-by: John Stultz <john.stultz@xxxxxxxxxx>
---
 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;
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux