diff options
author | Vladimir Murzin <vladimir.murzin@arm.com> | 2015-09-08 18:00:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-08 18:35:28 -0400 |
commit | 06f805965fc205e27681eee99fd2376fafd8da65 (patch) | |
tree | cc2d05c52272cad4e45889a77e7fd4f86cc2f441 | |
parent | 83b4b0bb635eee2b8e075062e4e008d1bc110ed7 (diff) |
memtest: use kstrtouint instead of simple_strtoul
Since simple_strtoul is obsolete and memtest_pattern is type of int, use
kstrtouint instead.
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Cc: Leon Romanovsky <leon@leon.nu>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/memtest.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mm/memtest.c b/mm/memtest.c index 0a1cc133f6d7..20e836138e00 100644 --- a/mm/memtest.c +++ b/mm/memtest.c | |||
@@ -89,16 +89,18 @@ static void __init do_one_pass(u64 pattern, phys_addr_t start, phys_addr_t end) | |||
89 | } | 89 | } |
90 | 90 | ||
91 | /* default is disabled */ | 91 | /* default is disabled */ |
92 | static int memtest_pattern __initdata; | 92 | static unsigned int memtest_pattern __initdata; |
93 | 93 | ||
94 | static int __init parse_memtest(char *arg) | 94 | static int __init parse_memtest(char *arg) |
95 | { | 95 | { |
96 | int ret = 0; | ||
97 | |||
96 | if (arg) | 98 | if (arg) |
97 | memtest_pattern = simple_strtoul(arg, NULL, 0); | 99 | ret = kstrtouint(arg, 0, &memtest_pattern); |
98 | else | 100 | else |
99 | memtest_pattern = ARRAY_SIZE(patterns); | 101 | memtest_pattern = ARRAY_SIZE(patterns); |
100 | 102 | ||
101 | return 0; | 103 | return ret; |
102 | } | 104 | } |
103 | 105 | ||
104 | early_param("memtest", parse_memtest); | 106 | early_param("memtest", parse_memtest); |