[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140507223732.2e9fa81810ce05b72247556c@skynet.be>
Date: Wed, 7 May 2014 22:37:32 +0200
From: Fabian Frederick <fabf@...net.be>
To: linux-kernel <linux-kernel@...r.kernel.org>
Cc: akpm <akpm@...ux-foundation.org>, Michal Hocko <mhocko@...e.cz>
Subject: [PATCH 1/1] kernel/res_counter.c: replace simple_strtoull by
kstrtoull
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Michal Hocko <mhocko@...e.cz>
Signed-off-by: Fabian Frederick <fabf@...net.be>
---
kernel/res_counter.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/res_counter.c b/kernel/res_counter.c
index 51dbac6..09c1a6a 100644
--- a/kernel/res_counter.c
+++ b/kernel/res_counter.c
@@ -183,11 +183,12 @@ int res_counter_memparse_write_strategy(const char *buf,
{
char *end;
unsigned long long res;
+ int rc;
/* return RES_COUNTER_MAX(unlimited) if "-1" is specified */
if (*buf == '-') {
- res = simple_strtoull(buf + 1, &end, 10);
- if (res != 1 || *end != '\0')
+ rc = kstrtoull(buf + 1, 10, &res);
+ if ((res != 1) || (rc))
return -EINVAL;
*resp = RES_COUNTER_MAX;
return 0;
--
1.8.4.5
--
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