diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-03-11 05:45:23 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-12 08:04:09 -0400 |
commit | 74694e7bd0fdba56f940c50ec4e51eda2c3870d3 (patch) | |
tree | d618dbb2ca0c1004f45caf0ccbc2a2b19fd76c18 /net/bridge/br_netlink.c | |
parent | 5096e3c4b2815da79a7ee1533349b2f21a698622 (diff) | |
download | linux-74694e7bd0fdba56f940c50ec4e51eda2c3870d3.tar.bz2 |
bridge: using for_each_set_bit to simplify the code
Using for_each_set_bit() 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/br_netlink.c')
-rw-r--r-- | net/bridge/br_netlink.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index db12a0fcfe50..138284219c6d 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c @@ -136,10 +136,7 @@ static int br_fill_ifinfo(struct sk_buff *skb, goto nla_put_failure; pvid = br_get_pvid(pv); - for (vid = find_first_bit(pv->vlan_bitmap, BR_VLAN_BITMAP_LEN); - vid < BR_VLAN_BITMAP_LEN; - vid = find_next_bit(pv->vlan_bitmap, - BR_VLAN_BITMAP_LEN, vid+1)) { + for_each_set_bit(vid, pv->vlan_bitmap, BR_VLAN_BITMAP_LEN) { vinfo.vid = vid; vinfo.flags = 0; if (vid == pvid) |