Skip to content

Commit

Permalink
memtest: use kstrtouint instead of simple_strtoul
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vladimir Murzin authored and Linus Torvalds committed Sep 8, 2015
1 parent 83b4b0b commit 06f8059
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mm/memtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 06f8059

Please sign in to comment.