netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] bridge: using for_each_set_bit_from to simplify the code
@ 2013-03-11 15:43 Wei Yongjun
  2013-03-12 12:15 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-03-11 15:43 UTC (permalink / raw)
  To: stephen, davem; +Cc: yongjun_wei, bridge, netdev

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Using for_each_set_bit_from() to simplify the code.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 net/bridge/br_fdb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index b0812c9..48fe761 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)
 	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);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] bridge: using for_each_set_bit_from to simplify the code
  2013-03-11 15:43 [PATCH -next] bridge: using for_each_set_bit_from to simplify the code Wei Yongjun
@ 2013-03-12 12:15 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-03-12 12:15 UTC (permalink / raw)
  To: weiyj.lk; +Cc: stephen, yongjun_wei, bridge, netdev

From: Wei Yongjun <weiyj.lk@gmail.com>
Date: Mon, 11 Mar 2013 23:43:48 +0800

> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Using for_each_set_bit_from() to simplify the code.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-12 12:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-11 15:43 [PATCH -next] bridge: using for_each_set_bit_from to simplify the code Wei Yongjun
2013-03-12 12:15 ` 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).