cgroups: remove calls to simple_kstrtoll
PATCH 3/3 cgroups: remove calls to simple_kstrtoll
Signed-off-by Daniel Walker <[email protected]>
--- kernel/cgroup.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
kernel/cgroup.c +7 -5
@@ -2276,7 +2276,7 @@ static ssize_t cgroup_write_X64(struct cgroup_subsys_state *css, {char buffer[CGROUP_LOCAL_BUFFER_SIZE ];int retval =0 ; -char *end; +int ret;if (!nbytes)return -EINVAL ;
@@ -2287,13 +2287,15 @@ static ssize_t cgroup_write_X64(struct cgroup_subsys_state *css, buffer[nbytes] =0 ;/* nul-terminate */ if (cft->write_u64) { -u64 val =simple_strtoull (strstrip (buffer), &end,0 ); -if (*end) +u64 val; + ret =kstrtoull (strstrip (buffer),0 , &val); +if (ret !=0 )return -EINVAL ; retval = cft->write_u64 (css, cft, val); }else { -s64 val =simple_strtoll (strstrip (buffer), &end,0 ); -if (*end) +s64 val; + ret =kstrtoll (strstrip (buffer),0 , &val); +if (ret !=0 )return -EINVAL ; retval = cft->write_s64 (css, cft, val); }
Signature · 1 line
1.8.3.2
Tejun Heo
maintainerQuoted 1 line · Daniel Walker
Signed-off-by Daniel Walker <[email protected]>
Can you please briefly explain why this conversion is happening in the patch description?
Thanks.
Signature · 1 line
tejun
Sure , I can add it .. It's because simple_strtoll is obsolete ..
Quoted 11 lines · Tejun Heo
Quoted 1 line · Daniel Walker
Signed-off-by Daniel Walker <[email protected]>Can you please briefly explain why this conversion is happening in the patch description?
Thanks.
Signature · 1 line
tejun
A message that is not in the archive (sent off-list or not yet received): 1382754793-8827-3-git-send-email-dwalker-zu3NM2574RrQT0dZR+AlfA@public.gmane.org
Quoted 1 line · Daniel Walker
Signed-off-by Daniel Walker <[email protected]>
Can you please briefly explain why this conversion is happening in the patch description?
Thanks.
Signature · 1 line
tejun