public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -mm] parse_integer: convert fs/9p/
@ 2015-07-20 22:06 Alexey Dobriyan
  0 siblings, 0 replies; only message in thread
From: Alexey Dobriyan @ 2015-07-20 22:06 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, ericvh, v9fs-developer

Convert deprecated simple_strtoul() usage.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-20 22:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-20 22:06 [PATCH -mm] parse_integer: convert fs/9p/ Alexey Dobriyan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox