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>
This commit is contained in:
Vladimir Murzin 2015-09-08 15:00:16 -07:00 коммит произвёл Linus Torvalds
Родитель 83b4b0bb63
Коммит 06f805965f
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -89,16 +89,18 @@ static void __init do_one_pass(u64 pattern, phys_addr_t start, phys_addr_t end)
} }
/* default is disabled */ /* default is disabled */
static int memtest_pattern __initdata; static unsigned int memtest_pattern __initdata;
static int __init parse_memtest(char *arg) static int __init parse_memtest(char *arg)
{ {
int ret = 0;
if (arg) if (arg)
memtest_pattern = simple_strtoul(arg, NULL, 0); ret = kstrtouint(arg, 0, &memtest_pattern);
else else
memtest_pattern = ARRAY_SIZE(patterns); memtest_pattern = ARRAY_SIZE(patterns);
return 0; return ret;
} }
early_param("memtest", parse_memtest); early_param("memtest", parse_memtest);