Commit 10c69a0d authored by Dominique Martinet's avatar Dominique Martinet

9p v9fs_parse_options: replace simple_strtoul with kstrtouint

This is also a checkpatch change, but this one might have more implications
so keeping this separate

Link: http://lkml.kernel.org/r/20211102134608.1588018-4-dominique.martinet@atmark-techno.comSigned-off-by: default avatarDominique Martinet <asmadeus@codewreck.org>
parent 024b7d6a
...@@ -164,7 +164,7 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts) ...@@ -164,7 +164,7 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
substring_t args[MAX_OPT_ARGS]; substring_t args[MAX_OPT_ARGS];
char *p; char *p;
int option = 0; int option = 0;
char *s, *e; char *s;
int ret = 0; int ret = 0;
/* setup defaults */ /* setup defaults */
...@@ -319,12 +319,13 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts) ...@@ -319,12 +319,13 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
v9ses->flags |= V9FS_ACCESS_CLIENT; v9ses->flags |= V9FS_ACCESS_CLIENT;
} else { } else {
uid_t uid; uid_t uid;
v9ses->flags |= V9FS_ACCESS_SINGLE; v9ses->flags |= V9FS_ACCESS_SINGLE;
uid = simple_strtoul(s, &e, 10); r = kstrtouint(s, 10, &uid);
if (*e != '\0') { if (r) {
ret = -EINVAL; ret = r;
pr_info("Unknown access argument %s\n", pr_info("Unknown access argument %s: %d\n",
s); s, r);
kfree(s); kfree(s);
continue; continue;
} }
......
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