Commit 692f2b6c authored by aybuke ozdemir's avatar aybuke ozdemir Committed by Greg Kroah-Hartman

Staging: lustre: use kstrtoul() instead of sscanf()

This patch makes checkpatch.pl by fixing the following warning:
WARNING: Prefer kstrto<type> to single variable sscanf.
I used to kstrtoul can convert unsigned long instead of sscanf
Signed-off-by: default avataraybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 99d08456
......@@ -2151,7 +2151,8 @@ int ll_process_config(struct lustre_cfg *lcfg)
ptr = strrchr(lustre_cfg_string(lcfg, 0), '-');
if (!ptr || !*(++ptr))
return -EINVAL;
if (sscanf(ptr, "%lx", &x) != 1)
rc = kstrtoul(ptr, 16, &x);
if (rc != 0)
return -EINVAL;
sb = (void *)x;
/* This better be a real Lustre superblock! */
......
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