Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5096e3c4 authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller
Browse files

bridge: using for_each_set_bit_from to simplify the code



Using for_each_set_bit_from() to simplify the code.

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3a918f40
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -161,9 +161,7 @@ void br_fdb_change_mac_address(struct net_bridge *br, const u8 *newaddr)
	if (!pv)
		return;

	for (vid = find_next_bit(pv->vlan_bitmap, BR_VLAN_BITMAP_LEN, vid);
	     vid < BR_VLAN_BITMAP_LEN;
	     vid = find_next_bit(pv->vlan_bitmap, BR_VLAN_BITMAP_LEN, vid+1)) {
	for_each_set_bit_from(vid, pv->vlan_bitmap, BR_VLAN_BITMAP_LEN) {
		f = __br_fdb_get(br, br->dev->dev_addr, vid);
		if (f && f->is_local && !f->dst)
			fdb_delete(br, f);