summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2014-04-08 16:04:13 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-08 16:48:52 -0700
commitd0057ca4c1fe73c05a9e077cc7691217370b3283 (patch)
treecf9fb38209bd853a1c5093347bd93d2ed6b031e0 /arch/x86
parente39435ce68bb4685288f78b1a7e24311f7ef939f (diff)
downloadblackbird-op-linux-d0057ca4c1fe73c05a9e077cc7691217370b3283.tar.gz
blackbird-op-linux-d0057ca4c1fe73c05a9e077cc7691217370b3283.zip
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 appropriately. Signed-off-by: David Rientjes <rientjes@google.com> Cc: Vegard Nossum <vegardno@ifi.uio.no> Acked-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/mm/kmemcheck/kmemcheck.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/mm/kmemcheck/kmemcheck.c b/arch/x86/mm/kmemcheck/kmemcheck.c
index d87dd6d042d6..dd89a13f1051 100644
--- a/arch/x86/mm/kmemcheck/kmemcheck.c
+++ b/arch/x86/mm/kmemcheck/kmemcheck.c
@@ -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;
}
OpenPOWER on IntegriCloud