net/core: simple_strtoul cleanup
Subsystems (2)
PATCH 1/1 net/core: simple_strtoul cleanup
Changed net/core/net-sysfs.c: netdev_store() to use kstrtoul() instead of obsolete simple_strtoul().
Quoted 1 line
From
84371b0ed8b277ec8005fd0efbc73165a8bd72b9Mon Sep 17 00:00:00 2001
From: Shuah Khan <[email protected]>
Date: Thu, 12 Apr 2012 10:36:10 -0600
Subject: [PATCH] net/core: simple_strtoul cleanup
Signed-off-by Shuah Khan <[email protected]>
--- net/core/net-sysfs.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
net/core/net-sysfs.c +2 -3
@@ -74,15 +74,14 @@ static ssize_t netdev_store(struct device *dev, struct device_attribute *attr, int (*set)(struct net_device *, unsigned long)) {struct net_device *net =to_net_dev (dev); -char *endp;unsigned long new;int ret = -EINVAL ;if (!capable (CAP_NET_ADMIN ))return -EPERM ; - new =simple_strtoul (buf, &endp,0 ); -if (endp == buf) + ret =kstrtoul (buf,0 , &new); +if (ret) goto err;if (!rtnl_trylock ())
Signature · 1 line
1.7.5.4
From: Shuah Khan <[email protected]>
Date: Thu, 12 Apr 2012 13:28:13 -0600
Quoted 10 lines
Changed
net/core/net-sysfs.c:netdev_store()to usekstrtoul()instead of obsoletesimple_strtoul().Quoted 1 line
From
84371b0ed8b277ec8005fd0efbc73165a8bd72b9Mon Sep 17 00:00:00 2001From: Shuah Khan <[email protected]>
Date: Thu, 12 Apr 2012 10:36:10 -0600
Subject: [PATCH] net/core:simple_strtoulcleanupSigned-off-by Shuah Khan <[email protected]>
Applied, thanks.