summaryrefslogtreecommitdiffstats
path: root/net/phonet/pn_dev.c
diff options
context:
space:
mode:
authorAkinobu Mita2010-03-11 13:07:49 +0100
committerDavid S. Miller2010-03-16 00:00:47 +0100
commita1ca14ac54675d3bf48d442b5a7b9eba133f1888 (patch)
tree4c140c289bf166b99f716cc685a34097520681d0 /net/phonet/pn_dev.c
parenttimestamping: fix example build (diff)
downloadkernel-qcow2-linux-a1ca14ac54675d3bf48d442b5a7b9eba133f1888.tar.gz
kernel-qcow2-linux-a1ca14ac54675d3bf48d442b5a7b9eba133f1888.tar.xz
kernel-qcow2-linux-a1ca14ac54675d3bf48d442b5a7b9eba133f1888.zip
phonet: use for_each_set_bit()
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/phonet/pn_dev.c')
-rw-r--r--net/phonet/pn_dev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c
index c597cc53a6fb..5c6ae0c701c0 100644
--- a/net/phonet/pn_dev.c
+++ b/net/phonet/pn_dev.c
@@ -107,8 +107,7 @@ static void phonet_device_destroy(struct net_device *dev)
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);
}