Commit ae0246da authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman

staging/lustre: Convert cfs_str2num_check to use kstrtoul

simple_strtoul is obsolete
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4d8a00ef
......@@ -229,18 +229,13 @@ int
cfs_str2num_check(char *str, int nob, unsigned *num,
unsigned min, unsigned max)
{
char *endp;
int rc;
str = cfs_trimwhite(str);
*num = simple_strtoul(str, &endp, 0);
if (endp == str)
rc = kstrtouint(str, 10, num);
if (rc)
return 0;
for (; endp < str + nob; endp++) {
if (!isspace(*endp))
return 0;
}
return (*num >= min && *num <= max);
}
EXPORT_SYMBOL(cfs_str2num_check);
......
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