Commit d0057ca4 authored by David Rientjes's avatar David Rientjes Committed by Linus Torvalds

arch/x86/mm/kmemcheck/kmemcheck.c: use kstrtoint() instead of sscanf()

Kmemcheck should use the preferred interface for parsing command line
arguments, kstrto*(), rather than sscanf() itself.  Use it
Signed-off-by: default avatarDavid Rientjes <>
Cc: Vegard Nossum <>
Acked-by: default avatarPekka Enberg <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent e39435ce
......@@ -78,10 +78,16 @@ early_initcall(kmemcheck_init);
static int __init param_kmemcheck(char *str)
int val;
int ret;
if (!str)
return -EINVAL;
sscanf(str, "%d", &kmemcheck_enabled);
ret = kstrtoint(str, 0, &val);
if (ret)
return ret;
kmemcheck_enabled = val;
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment