lkml.org 
[lkml]   [2008]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[mmotm] kill devcgroup-code-cleanup.patch warning
Patch titile: devcgroup-code-cleanup-fix-fix.patch
Patch against: mmotm Jul 13
Applies after: devcgroup-code-cleanup-fix.patch

devcgroup-code-cleanup.patch made following warnings because b is const.

security/device_cgroup.c: In function 'devcgroup_update_access':
security/device_cgroup.c:397: warning: passing argument 2 of 'simple_strtoul' from incompatible pointer type
security/device_cgroup.c:410: warning: passing argument 2 of 'simple_strtoul' from incompatible pointer type

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
CC: Li Zefan <lizf@cn.fujitsu.com>

---
security/device_cgroup.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

Index: b/security/device_cgroup.c
===================================================================
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -359,6 +359,7 @@ static int devcgroup_update_access(struc
{
struct dev_cgroup *cur_devcgroup;
const char *b;
+ char *endp;
int retval = 0, count;
struct dev_whitelist_item wh;

@@ -394,7 +395,8 @@ static int devcgroup_update_access(struc
wh.major = ~0;
b++;
} else if (isdigit(*b)) {
- wh.major = simple_strtoul(b, &b, 10);
+ wh.major = simple_strtoul(b, &endp, 10);
+ b = endp;
} else {
return -EINVAL;
}
@@ -407,7 +409,8 @@ static int devcgroup_update_access(struc
wh.minor = ~0;
b++;
} else if (isdigit(*b)) {
- wh.minor = simple_strtoul(b, &b, 10);
+ wh.minor = simple_strtoul(b, &endp, 10);
+ b = endp;
} else {
return -EINVAL;
}



\
 
 \ /
  Last update: 2008-07-14 12:57    [W:0.025 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site