* [patch 1/5] phonet: use for_each_set_bit()
@ 2010-03-11 22:07 akpm
2010-03-12 7:34 ` Rémi Denis-Courmont
2010-03-15 23:05 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: akpm @ 2010-03-11 22:07 UTC (permalink / raw)
To: davem; +Cc: netdev, akpm, akinobu.mita
From: Akinobu Mita <akinobu.mita@gmail.com>
Replace open-coded loop with for_each_set_bit().
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
net/phonet/pn_dev.c | 3 +--
net/phonet/pn_netlink.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff -puN net/phonet/pn_dev.c~phonet-use-for_each_set_bit net/phonet/pn_dev.c
--- a/net/phonet/pn_dev.c~phonet-use-for_each_set_bit
+++ a/net/phonet/pn_dev.c
@@ -107,8 +107,7 @@ static void phonet_device_destroy(struct
if (pnd) {
u8 addr;
- for (addr = find_first_bit(pnd->addrs, 64); addr < 64;
- addr = find_next_bit(pnd->addrs, 64, 1+addr))
+ for_each_set_bit(addr, pnd->addrs, 64)
phonet_address_notify(RTM_DELADDR, dev, addr);
kfree(pnd);
}
diff -puN net/phonet/pn_netlink.c~phonet-use-for_each_set_bit net/phonet/pn_netlink.c
--- a/net/phonet/pn_netlink.c~phonet-use-for_each_set_bit
+++ a/net/phonet/pn_netlink.c
@@ -141,8 +141,7 @@ static int getaddr_dumpit(struct sk_buff
continue;
addr_idx = 0;
- for (addr = find_first_bit(pnd->addrs, 64); addr < 64;
- addr = find_next_bit(pnd->addrs, 64, 1+addr)) {
+ for_each_set_bit(addr, pnd->addrs, 64) {
if (addr_idx++ < addr_start_idx)
continue;
_
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 1/5] phonet: use for_each_set_bit()
2010-03-11 22:07 [patch 1/5] phonet: use for_each_set_bit() akpm
@ 2010-03-12 7:34 ` Rémi Denis-Courmont
2010-03-15 23:05 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Rémi Denis-Courmont @ 2010-03-12 7:34 UTC (permalink / raw)
To: akpm; +Cc: davem, netdev, akinobu.mita
On Thu, 11 Mar 2010 14:07:49 -0800, akpm@linux-foundation.org wrote:
> From: Akinobu Mita <akinobu.mita@gmail.com>
>
> Replace open-coded loop with for_each_set_bit().
>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
--
Rémi Denis-Courmont
http://www.remlab.net
http://fi.linkedin.com/in/remidenis
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 1/5] phonet: use for_each_set_bit()
2010-03-11 22:07 [patch 1/5] phonet: use for_each_set_bit() akpm
2010-03-12 7:34 ` Rémi Denis-Courmont
@ 2010-03-15 23:05 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2010-03-15 23:05 UTC (permalink / raw)
To: akpm; +Cc: netdev, akinobu.mita
From: akpm@linux-foundation.org
Date: Thu, 11 Mar 2010 14:07:49 -0800
> From: Akinobu Mita <akinobu.mita@gmail.com>
>
> Replace open-coded loop with for_each_set_bit().
>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-15 23:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-11 22:07 [patch 1/5] phonet: use for_each_set_bit() akpm
2010-03-12 7:34 ` Rémi Denis-Courmont
2010-03-15 23:05 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).