diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-03-11 01:43:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-12 08:04:08 -0400 |
commit | 5096e3c4b2815da79a7ee1533349b2f21a698622 (patch) | |
tree | 5c6945b7e064b4de985a3c67d1e458b300088c56 /net/bridge | |
parent | 3a918f4036f5c4689a091c2b9affcca2066803ee (diff) |
bridge: using for_each_set_bit_from to simplify the code
Using for_each_set_bit_from() to simplify the code.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_fdb.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index b0812c91c0f0..48fe76176a22 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c | |||
@@ -161,9 +161,7 @@ void br_fdb_change_mac_address(struct net_bridge *br, const u8 *newaddr) | |||
161 | if (!pv) | 161 | if (!pv) |
162 | return; | 162 | return; |
163 | 163 | ||
164 | for (vid = find_next_bit(pv->vlan_bitmap, BR_VLAN_BITMAP_LEN, vid); | 164 | for_each_set_bit_from(vid, pv->vlan_bitmap, BR_VLAN_BITMAP_LEN) { |
165 | vid < BR_VLAN_BITMAP_LEN; | ||
166 | vid = find_next_bit(pv->vlan_bitmap, BR_VLAN_BITMAP_LEN, vid+1)) { | ||
167 | f = __br_fdb_get(br, br->dev->dev_addr, vid); | 165 | f = __br_fdb_get(br, br->dev->dev_addr, vid); |
168 | if (f && f->is_local && !f->dst) | 166 | if (f && f->is_local && !f->dst) |
169 | fdb_delete(br, f); | 167 | fdb_delete(br, f); |