Skip to content

Commit 06f8059

Browse files
murzinvtorvalds
authored andcommitted
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>
1 parent 83b4b0b commit 06f8059

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎mm/memtest.c‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,18 @@ static void __init do_one_pass(u64 pattern, phys_addr_t start, phys_addr_t end)
8989
}
9090

9191
/* default is disabled */
92-
static int memtest_pattern __initdata;
92+
static unsigned int memtest_pattern __initdata;
9393

9494
static int __init parse_memtest(char *arg)
9595
{
96+
int ret = 0;
97+
9698
if (arg)
97-
memtest_pattern = simple_strtoul(arg, NULL, 0);
99+
ret = kstrtouint(arg, 0, &memtest_pattern);
98100
else
99101
memtest_pattern = ARRAY_SIZE(patterns);
100102

101-
return 0;
103+
return ret;
102104
}
103105

104106
early_param("memtest", parse_memtest);

0 commit comments

Comments
 (0)