aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorHannes Eder <hannes@hanneseder.net>2009-02-14 06:15:33 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-17 20:26:08 -0500
commit1f78d9f94539b8806b81057e75025f2bac7d7ccc (patch)
treeb97ca60ead50124513d83c5bc663f47d957cbe87 /drivers/net/bonding
parentb79d8fff0e54a19e96cbde2b1f79e0fd503c2c53 (diff)
drivers/net/bonding: fix sparse warnings: context imbalance
Impact: Attribute functions with __acquires(...) and/or __releases(...). Fix this sparse warnings: drivers/net/bonding/bond_alb.c:1675:9: warning: context imbalance in 'bond_alb_handle_active_change' - unexpected unlock drivers/net/bonding/bond_alb.c:1742:9: warning: context imbalance in 'bond_alb_set_mac_address' - unexpected unlock drivers/net/bonding/bond_main.c:1025:17: warning: context imbalance in 'bond_do_fail_over_mac' - unexpected unlock drivers/net/bonding/bond_main.c:3195:13: warning: context imbalance in 'bond_info_seq_start' - wrong count at exit drivers/net/bonding/bond_main.c:3234:13: warning: context imbalance in 'bond_info_seq_stop' - unexpected unlock Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_alb.c8
-rw-r--r--drivers/net/bonding/bond_main.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 409b14074275..8dc6fbb9a41e 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -1628,6 +1628,10 @@ void bond_alb_handle_link_change(struct bonding *bond, struct slave *slave, char
1628 * no other locks may be held. 1628 * no other locks may be held.
1629 */ 1629 */
1630void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave) 1630void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave)
1631 __releases(&bond->curr_slave_lock)
1632 __releases(&bond->lock)
1633 __acquires(&bond->lock)
1634 __acquires(&bond->curr_slave_lock)
1631{ 1635{
1632 struct slave *swap_slave; 1636 struct slave *swap_slave;
1633 int i; 1637 int i;
@@ -1704,6 +1708,10 @@ void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave
1704 * Called with RTNL 1708 * Called with RTNL
1705 */ 1709 */
1706int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr) 1710int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
1711 __releases(&bond->curr_slave_lock)
1712 __releases(&bond->lock)
1713 __acquires(&bond->lock)
1714 __acquires(&bond->curr_slave_lock)
1707{ 1715{
1708 struct bonding *bond = netdev_priv(bond_dev); 1716 struct bonding *bond = netdev_priv(bond_dev);
1709 struct sockaddr *sa = addr; 1717 struct sockaddr *sa = addr;
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 21bce2c0fde2..d7695d43158b 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1002,6 +1002,10 @@ static void bond_mc_swap(struct bonding *bond, struct slave *new_active, struct
1002static void bond_do_fail_over_mac(struct bonding *bond, 1002static void bond_do_fail_over_mac(struct bonding *bond,
1003 struct slave *new_active, 1003 struct slave *new_active,
1004 struct slave *old_active) 1004 struct slave *old_active)
1005 __releases(&bond->curr_slave_lock)
1006 __releases(&bond->lock)
1007 __acquires(&bond->lock)
1008 __acquires(&bond->curr_slave_lock)
1005{ 1009{
1006 u8 tmp_mac[ETH_ALEN]; 1010 u8 tmp_mac[ETH_ALEN];
1007 struct sockaddr saddr; 1011 struct sockaddr saddr;
@@ -3193,6 +3197,8 @@ out:
3193#ifdef CONFIG_PROC_FS 3197#ifdef CONFIG_PROC_FS
3194 3198
3195static void *bond_info_seq_start(struct seq_file *seq, loff_t *pos) 3199static void *bond_info_seq_start(struct seq_file *seq, loff_t *pos)
3200 __acquires(&dev_base_lock)
3201 __acquires(&bond->lock)
3196{ 3202{
3197 struct bonding *bond = seq->private; 3203 struct bonding *bond = seq->private;
3198 loff_t off = 0; 3204 loff_t off = 0;
@@ -3232,6 +3238,8 @@ static void *bond_info_seq_next(struct seq_file *seq, void *v, loff_t *pos)
3232} 3238}
3233 3239
3234static void bond_info_seq_stop(struct seq_file *seq, void *v) 3240static void bond_info_seq_stop(struct seq_file *seq, void *v)
3241 __releases(&bond->lock)
3242 __releases(&dev_base_lock)
3235{ 3243{
3236 struct bonding *bond = seq->private; 3244 struct bonding *bond = seq->private;
3237 3245