[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20150720220657.GA8907@p183.telecom.by>
Date: Tue, 21 Jul 2015 01:06:58 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org, ericvh@...il.com,
v9fs-developer@...ts.sourceforge.net
Subject: [PATCH -mm] parse_integer: convert fs/9p/
Convert deprecated simple_strtoul() usage.
Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
---
fs/9p/v9fs.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -116,7 +116,7 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
substring_t args[MAX_OPT_ARGS];
char *p;
int option = 0;
- char *s, *e;
+ char *s;
int ret = 0;
/* setup defaults */
@@ -269,8 +269,10 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
} else {
uid_t uid;
v9ses->flags |= V9FS_ACCESS_SINGLE;
- uid = simple_strtoul(s, &e, 10);
- if (*e != '\0') {
+ ret = parse_integer(s, 10, &uid);
+ if (ret < 0)
+ return ret;
+ if (s[ret] != '\0') {
ret = -EINVAL;
pr_info("Unknown access argument %s\n",
s);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists