Commit 7297cb68 authored by Daniel Walter's avatar Daniel Walter Committed by Trond Myklebust

nfs: replace strict_strto* with kstrto*

[nfs] replace strict_str* with kstr* variants

 * replace string conversions with newer kstr* functions
Signed-off-by: default avatarDaniel Walter <sahne@0x90.at>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent ee34e136
...@@ -158,7 +158,7 @@ static int nfs_map_string_to_numeric(const char *name, size_t namelen, __u32 *re ...@@ -158,7 +158,7 @@ static int nfs_map_string_to_numeric(const char *name, size_t namelen, __u32 *re
return 0; return 0;
memcpy(buf, name, namelen); memcpy(buf, name, namelen);
buf[namelen] = '\0'; buf[namelen] = '\0';
if (strict_strtoul(buf, 0, &val) != 0) if (kstrtoul(buf, 0, &val) != 0)
return 0; return 0;
*res = val; *res = val;
return 1; return 1;
...@@ -364,7 +364,7 @@ static int nfs_idmap_lookup_id(const char *name, size_t namelen, const char *typ ...@@ -364,7 +364,7 @@ static int nfs_idmap_lookup_id(const char *name, size_t namelen, const char *typ
if (data_size <= 0) { if (data_size <= 0) {
ret = -EINVAL; ret = -EINVAL;
} else { } else {
ret = strict_strtol(id_str, 10, &id_long); ret = kstrtol(id_str, 10, &id_long);
*id = (__u32)id_long; *id = (__u32)id_long;
} }
return ret; return ret;
......
...@@ -1112,7 +1112,7 @@ static int nfs_get_option_ul(substring_t args[], unsigned long *option) ...@@ -1112,7 +1112,7 @@ static int nfs_get_option_ul(substring_t args[], unsigned long *option)
string = match_strdup(args); string = match_strdup(args);
if (string == NULL) if (string == NULL)
return -ENOMEM; return -ENOMEM;
rc = strict_strtoul(string, 10, option); rc = kstrtoul(string, 10, option);
kfree(string); kfree(string);
return rc; return rc;
...@@ -2681,7 +2681,7 @@ static int param_set_portnr(const char *val, const struct kernel_param *kp) ...@@ -2681,7 +2681,7 @@ static int param_set_portnr(const char *val, const struct kernel_param *kp)
if (!val) if (!val)
return -EINVAL; return -EINVAL;
ret = strict_strtoul(val, 0, &num); ret = kstrtoul(val, 0, &num);
if (ret == -EINVAL || num > NFS_CALLBACK_MAXPORTNR) if (ret == -EINVAL || num > NFS_CALLBACK_MAXPORTNR)
return -EINVAL; return -EINVAL;
*((unsigned int *)kp->arg) = num; *((unsigned int *)kp->arg) = num;
......
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