bonding: make USES_PRIMARY inline functions
Change the name a bit to better reflect its scope, and update some comments. Two functions added - one which takes bond as a param and the other which takes the mode. CC: Jay Vosburgh <j.vosburgh@gmail.com> CC: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Veaceslav Falico <vfalico@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
267bed777a
commit
ec0865a949
@@ -693,7 +693,7 @@ int bond_option_mode_set(struct bonding *bond, const struct bond_opt_value *newv
|
||||
static struct net_device *__bond_option_active_slave_get(struct bonding *bond,
|
||||
struct slave *slave)
|
||||
{
|
||||
return USES_PRIMARY(bond->params.mode) && slave ? slave->dev : NULL;
|
||||
return bond_uses_primary(bond) && slave ? slave->dev : NULL;
|
||||
}
|
||||
|
||||
struct net_device *bond_option_active_slave_get_rcu(struct bonding *bond)
|
||||
|
Reference in New Issue
Block a user