From: Vladimir Murzin Date: Tue, 8 Sep 2015 22:00:16 +0000 (-0700) Subject: memtest: use kstrtouint instead of simple_strtoul X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=06f805965fc205e27681eee99fd2376fafd8da65;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Leon Romanovsky Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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) } /* default is disabled */ -static int memtest_pattern __initdata; +static unsigned int memtest_pattern __initdata; static int __init parse_memtest(char *arg) { + int ret = 0; + if (arg) - memtest_pattern = simple_strtoul(arg, NULL, 0); + ret = kstrtouint(arg, 0, &memtest_pattern); else memtest_pattern = ARRAY_SIZE(patterns); - return 0; + return ret; } early_param("memtest", parse_memtest);