* [PATCH 1/5] net/batman-adv: use kstrtoul, etc
2011-11-06 13:26 [PATCH 0/5] use kstrtoul, etc Julia Lawall
@ 2011-11-06 13:26 ` Julia Lawall
[not found] ` <1320586010-21931-2-git-send-email-julia-dAYI7NvHqcQ@public.gmane.org>
2011-11-06 13:26 ` [PATCH 2/5] net/sunrpc: " Julia Lawall
` (3 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Julia Lawall @ 2011-11-06 13:26 UTC (permalink / raw)
To: Marek Lindner
Cc: kernel-janitors, Simon Wunderlich, David S. Miller, b.a.t.m.a.n,
netdev, linux-kernel
From: Julia Lawall <julia@diku.dk>
Use kstrtoul, etc instead of the now deprecated strict_strtoul, etc.
A semantic patch rule for the kstrtoul case is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression a,b;
{int,long} *c;
@@
-strict_strtoul
+kstrtoul
(a,b,c)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
---
net/batman-adv/bat_sysfs.c | 4 ++--
net/batman-adv/gateway_common.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff -u -p a/net/batman-adv/bat_sysfs.c b/net/batman-adv/bat_sysfs.c
--- a/net/batman-adv/bat_sysfs.c
+++ b/net/batman-adv/bat_sysfs.c
@@ -174,7 +174,7 @@ static int store_uint_attr(const char *b
unsigned long uint_val;
int ret;
- ret = strict_strtoul(buff, 10, &uint_val);
+ ret = kstrtoul(buff, 10, &uint_val);
if (ret) {
bat_info(net_dev,
"%s: Invalid parameter received: %s\n",
@@ -239,7 +239,7 @@ static ssize_t store_vis_mode(struct kob
unsigned long val;
int ret, vis_mode_tmp = -1;
- ret = strict_strtoul(buff, 10, &val);
+ ret = kstrtoul(buff, 10, &val);
if (((count == 2) && (!ret) && (val == VIS_TYPE_CLIENT_UPDATE)) ||
(strncmp(buff, "client", 6) == 0) ||
diff -u -p a/net/batman-adv/gateway_common.c b/net/batman-adv/gateway_common.c
--- a/net/batman-adv/gateway_common.c
+++ b/net/batman-adv/gateway_common.c
@@ -97,7 +97,7 @@ static bool parse_gw_bandwidth(struct ne
*tmp_ptr = '\0';
}
- ret = strict_strtol(buff, 10, &ldown);
+ ret = kstrtol(buff, 10, &ldown);
if (ret) {
bat_err(net_dev,
"Download speed of gateway mode invalid: %s\n",
@@ -122,7 +122,7 @@ static bool parse_gw_bandwidth(struct ne
*tmp_ptr = '\0';
}
- ret = strict_strtol(slash_ptr + 1, 10, &lup);
+ ret = kstrtol(slash_ptr + 1, 10, &lup);
if (ret) {
bat_err(net_dev,
"Upload speed of gateway mode invalid: "
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH 2/5] net/sunrpc: use kstrtoul, etc
2011-11-06 13:26 [PATCH 0/5] use kstrtoul, etc Julia Lawall
2011-11-06 13:26 ` [PATCH 1/5] net/batman-adv: " Julia Lawall
@ 2011-11-06 13:26 ` Julia Lawall
[not found] ` <1320586010-21931-3-git-send-email-julia-dAYI7NvHqcQ@public.gmane.org>
2011-11-06 13:26 ` [PATCH 3/5] net/mac80211/debugfs.c: " Julia Lawall
` (2 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Julia Lawall @ 2011-11-06 13:26 UTC (permalink / raw)
To: J. Bruce Fields
Cc: kernel-janitors, Neil Brown, Trond Myklebust, David S. Miller,
linux-nfs, netdev, linux-kernel
From: Julia Lawall <julia@diku.dk>
Use kstrtoul, etc instead of the now deprecated strict_strtoul, etc.
A semantic patch rule for the kstrtoul case is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression a,b;
{int,long} *c;
@@
-strict_strtoul
+kstrtoul
(a,b,c)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
---
net/sunrpc/addr.c | 6 +++---
net/sunrpc/auth.c | 2 +-
net/sunrpc/xprtsock.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff -u -p a/net/sunrpc/addr.c b/net/sunrpc/addr.c
--- a/net/sunrpc/addr.c
+++ b/net/sunrpc/addr.c
@@ -182,7 +182,7 @@ static int rpc_parse_scope_id(const char
scope_id = dev->ifindex;
dev_put(dev);
} else {
- if (strict_strtoul(p, 10, &scope_id) == 0) {
+ if (kstrtoul(p, 10, &scope_id) == 0) {
kfree(p);
return 0;
}
@@ -322,7 +322,7 @@ size_t rpc_uaddr2sockaddr(const char *ua
c = strrchr(buf, '.');
if (unlikely(c == NULL))
return 0;
- if (unlikely(strict_strtoul(c + 1, 10, &portlo) != 0))
+ if (unlikely(kstrtoul(c + 1, 10, &portlo) != 0))
return 0;
if (unlikely(portlo > 255))
return 0;
@@ -331,7 +331,7 @@ size_t rpc_uaddr2sockaddr(const char *ua
c = strrchr(buf, '.');
if (unlikely(c == NULL))
return 0;
- if (unlikely(strict_strtoul(c + 1, 10, &porthi) != 0))
+ if (unlikely(kstrtoul(c + 1, 10, &porthi) != 0))
return 0;
if (unlikely(porthi > 255))
return 0;
diff -u -p a/net/sunrpc/auth.c b/net/sunrpc/auth.c
--- a/net/sunrpc/auth.c
+++ b/net/sunrpc/auth.c
@@ -47,7 +47,7 @@ static int param_set_hashtbl_sz(const ch
if (!val)
goto out_inval;
- ret = strict_strtoul(val, 0, &num);
+ ret = kstrtoul(val, 0, &num);
if (ret == -EINVAL)
goto out_inval;
nbits = fls(num);
diff -u -p a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -2925,7 +2925,7 @@ static int param_set_uint_minmax(const c
if (!val)
return -EINVAL;
- ret = strict_strtoul(val, 0, &num);
+ ret = kstrtoul(val, 0, &num);
if (ret == -EINVAL || num < min || num > max)
return -EINVAL;
*((unsigned int *)kp->arg) = num;
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH 3/5] net/mac80211/debugfs.c: use kstrtoul, etc
2011-11-06 13:26 [PATCH 0/5] use kstrtoul, etc Julia Lawall
2011-11-06 13:26 ` [PATCH 1/5] net/batman-adv: " Julia Lawall
2011-11-06 13:26 ` [PATCH 2/5] net/sunrpc: " Julia Lawall
@ 2011-11-06 13:26 ` Julia Lawall
2011-11-07 11:47 ` Eliad Peller
2011-11-06 13:26 ` [PATCH 4/5] net/rfkill/core.c: " Julia Lawall
2011-11-06 13:26 ` [PATCH 5/5] net/dns_resolver/dns_key.c: " Julia Lawall
4 siblings, 1 reply; 13+ messages in thread
From: Julia Lawall @ 2011-11-06 13:26 UTC (permalink / raw)
To: John W. Linville
Cc: kernel-janitors, Johannes Berg, David S. Miller, linux-wireless,
netdev, linux-kernel
From: Julia Lawall <julia@diku.dk>
Use kstrtoul, etc instead of the now deprecated strict_strtoul, etc.
A semantic patch rule for the kstrtoul case is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression a,b;
{int,long} *c;
@@
-strict_strtoul
+kstrtoul
(a,b,c)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
---
net/mac80211/debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -u -p a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -190,7 +190,7 @@ static ssize_t uapsd_max_sp_len_write(st
return -EFAULT;
buf[len] = '\0';
- ret = strict_strtoul(buf, 0, &val);
+ ret = kstrtoul(buf, 0, &val);
if (ret)
return -EINVAL;
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH 3/5] net/mac80211/debugfs.c: use kstrtoul, etc
2011-11-06 13:26 ` [PATCH 3/5] net/mac80211/debugfs.c: " Julia Lawall
@ 2011-11-07 11:47 ` Eliad Peller
2011-11-07 11:58 ` Julia Lawall
0 siblings, 1 reply; 13+ messages in thread
From: Eliad Peller @ 2011-11-07 11:47 UTC (permalink / raw)
To: Julia Lawall
Cc: John W. Linville, kernel-janitors, Johannes Berg, David S. Miller,
linux-wireless, netdev, linux-kernel
On Sun, Nov 6, 2011 at 3:26 PM, Julia Lawall <julia@diku.dk> wrote:
> From: Julia Lawall <julia@diku.dk>
>
> Use kstrtoul, etc instead of the now deprecated strict_strtoul, etc.
>
> A semantic patch rule for the kstrtoul case is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression a,b;
> {int,long} *c;
> @@
>
> -strict_strtoul
> +kstrtoul
> (a,b,c)
> // </smpl>
>
> Signed-off-by: Julia Lawall <julia@diku.dk>
>
> ---
> net/mac80211/debugfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff -u -p a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
> --- a/net/mac80211/debugfs.c
> +++ b/net/mac80211/debugfs.c
> @@ -190,7 +190,7 @@ static ssize_t uapsd_max_sp_len_write(st
> return -EFAULT;
> buf[len] = '\0';
>
> - ret = strict_strtoul(buf, 0, &val);
> + ret = kstrtoul(buf, 0, &val);
>
> if (ret)
> return -EINVAL;
>
maybe while cleaning it up change copy_from_user +
strict_stroul/kstroul -> kstroul_from_user?
Eliad.
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH 3/5] net/mac80211/debugfs.c: use kstrtoul, etc
2011-11-07 11:47 ` Eliad Peller
@ 2011-11-07 11:58 ` Julia Lawall
0 siblings, 0 replies; 13+ messages in thread
From: Julia Lawall @ 2011-11-07 11:58 UTC (permalink / raw)
To: Eliad Peller
Cc: Julia Lawall, John W. Linville, kernel-janitors, Johannes Berg,
David S. Miller, linux-wireless, netdev, linux-kernel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1159 bytes --]
On Mon, 7 Nov 2011, Eliad Peller wrote:
> On Sun, Nov 6, 2011 at 3:26 PM, Julia Lawall <julia@diku.dk> wrote:
>> From: Julia Lawall <julia@diku.dk>
>>
>> Use kstrtoul, etc instead of the now deprecated strict_strtoul, etc.
>>
>> A semantic patch rule for the kstrtoul case is as follows:
>> (http://coccinelle.lip6.fr/)
>>
>> // <smpl>
>> @@
>> expression a,b;
>> {int,long} *c;
>> @@
>>
>> -strict_strtoul
>> +kstrtoul
>> (a,b,c)
>> // </smpl>
>>
>> Signed-off-by: Julia Lawall <julia@diku.dk>
>>
>> ---
>> net/mac80211/debugfs.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff -u -p a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
>> --- a/net/mac80211/debugfs.c
>> +++ b/net/mac80211/debugfs.c
>> @@ -190,7 +190,7 @@ static ssize_t uapsd_max_sp_len_write(st
>> return -EFAULT;
>> buf[len] = '\0';
>>
>> - ret = strict_strtoul(buf, 0, &val);
>> + ret = kstrtoul(buf, 0, &val);
>>
>> if (ret)
>> return -EINVAL;
>>
>
> maybe while cleaning it up change copy_from_user +
> strict_stroul/kstroul -> kstroul_from_user?
Thanks for the suggestion. I will look into it.
julia
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 4/5] net/rfkill/core.c: use kstrtoul, etc
2011-11-06 13:26 [PATCH 0/5] use kstrtoul, etc Julia Lawall
` (2 preceding siblings ...)
2011-11-06 13:26 ` [PATCH 3/5] net/mac80211/debugfs.c: " Julia Lawall
@ 2011-11-06 13:26 ` Julia Lawall
2011-11-06 13:26 ` [PATCH 5/5] net/dns_resolver/dns_key.c: " Julia Lawall
4 siblings, 0 replies; 13+ messages in thread
From: Julia Lawall @ 2011-11-06 13:26 UTC (permalink / raw)
To: Johannes Berg
Cc: kernel-janitors, John W. Linville, David S. Miller,
linux-wireless, netdev, linux-kernel
From: Julia Lawall <julia@diku.dk>
Use kstrtoul, etc instead of the now deprecated strict_strtoul, etc.
A semantic patch rule for the kstrtoul case is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression a,b;
{int,long} *c;
@@
-strict_strtoul
+kstrtoul
(a,b,c)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
---
net/rfkill/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -u -p a/net/rfkill/core.c b/net/rfkill/core.c
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -644,7 +644,7 @@ static ssize_t rfkill_soft_store(struct
if (!capable(CAP_NET_ADMIN))
return -EPERM;
- err = strict_strtoul(buf, 0, &state);
+ err = kstrtoul(buf, 0, &state);
if (err)
return err;
@@ -688,7 +688,7 @@ static ssize_t rfkill_state_store(struct
if (!capable(CAP_NET_ADMIN))
return -EPERM;
- err = strict_strtoul(buf, 0, &state);
+ err = kstrtoul(buf, 0, &state);
if (err)
return err;
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH 5/5] net/dns_resolver/dns_key.c: use kstrtoul, etc
2011-11-06 13:26 [PATCH 0/5] use kstrtoul, etc Julia Lawall
` (3 preceding siblings ...)
2011-11-06 13:26 ` [PATCH 4/5] net/rfkill/core.c: " Julia Lawall
@ 2011-11-06 13:26 ` Julia Lawall
4 siblings, 0 replies; 13+ messages in thread
From: Julia Lawall @ 2011-11-06 13:26 UTC (permalink / raw)
To: David S. Miller; +Cc: kernel-janitors, netdev, linux-kernel
From: Julia Lawall <julia@diku.dk>
Use kstrtoul, etc instead of the now deprecated strict_strtoul, etc.
A semantic patch rule for the kstrtoul case is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression a,b;
{int,long} *c;
@@
-strict_strtoul
+kstrtoul
(a,b,c)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
---
net/dns_resolver/dns_key.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -u -p a/net/dns_resolver/dns_key.c b/net/dns_resolver/dns_key.c
--- a/net/dns_resolver/dns_key.c
+++ b/net/dns_resolver/dns_key.c
@@ -118,7 +118,7 @@ dns_resolver_instantiate(struct key *key
if (opt_vlen <= 0)
goto bad_option_value;
- ret = strict_strtoul(eq, 10, &derrno);
+ ret = kstrtoul(eq, 10, &derrno);
if (ret < 0)
goto bad_option_value;
^ permalink raw reply [flat|nested] 13+ messages in thread