diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2010-03-11 07:07:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-15 19:00:47 -0400 |
commit | a1ca14ac54675d3bf48d442b5a7b9eba133f1888 (patch) | |
tree | 4c140c289bf166b99f716cc685a34097520681d0 /net/phonet/pn_dev.c | |
parent | f28f9e43b3d81d1e69da0ebf77c8a6780cb5e0c8 (diff) |
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.c | 3 |
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) | |||
107 | if (pnd) { | 107 | if (pnd) { |
108 | u8 addr; | 108 | u8 addr; |
109 | 109 | ||
110 | for (addr = find_first_bit(pnd->addrs, 64); addr < 64; | 110 | for_each_set_bit(addr, pnd->addrs, 64) |
111 | addr = find_next_bit(pnd->addrs, 64, 1+addr)) | ||
112 | phonet_address_notify(RTM_DELADDR, dev, addr); | 111 | phonet_address_notify(RTM_DELADDR, dev, addr); |
113 | kfree(pnd); | 112 | kfree(pnd); |
114 | } | 113 | } |