* [PATCH 3/5] net/mac80211/debugfs.c: use kstrtoul, etc [not found] <1320586010-21931-1-git-send-email-julia@diku.dk> @ 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 1 sibling, 1 reply; 4+ 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] 4+ 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: use kstrtoul, etc Julia Lawall @ 2011-11-07 11:47 ` Eliad Peller 2011-11-07 11:58 ` Julia Lawall 0 siblings, 1 reply; 4+ 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] 4+ 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; 4+ 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] 4+ messages in thread
* [PATCH 4/5] net/rfkill/core.c: use kstrtoul, etc [not found] <1320586010-21931-1-git-send-email-julia@diku.dk> 2011-11-06 13:26 ` [PATCH 3/5] net/mac80211/debugfs.c: use kstrtoul, etc Julia Lawall @ 2011-11-06 13:26 ` Julia Lawall 1 sibling, 0 replies; 4+ 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] 4+ messages in thread
end of thread, other threads:[~2011-11-07 12:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1320586010-21931-1-git-send-email-julia@diku.dk>
2011-11-06 13:26 ` [PATCH 3/5] net/mac80211/debugfs.c: use kstrtoul, etc Julia Lawall
2011-11-07 11:47 ` Eliad Peller
2011-11-07 11:58 ` Julia Lawall
2011-11-06 13:26 ` [PATCH 4/5] net/rfkill/core.c: " Julia Lawall
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox