mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
bond: cleanup netpoll code
This started out with fixing a sparse warning, then I realized that the wrapper function bond_netpoll_info could just be removed by rolling it into the enable code. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0fb52a27a0
commit
10eccb46b5
1 changed files with 1 additions and 7 deletions
|
@ -1245,12 +1245,6 @@ static int bond_netpoll_setup(struct net_device *dev, struct netpoll_info *ni, g
|
||||||
}
|
}
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct netpoll_info *bond_netpoll_info(struct bonding *bond)
|
|
||||||
{
|
|
||||||
return bond->dev->npinfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
static inline int slave_enable_netpoll(struct slave *slave)
|
static inline int slave_enable_netpoll(struct slave *slave)
|
||||||
{
|
{
|
||||||
|
@ -1795,7 +1789,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
|
||||||
bond_set_carrier(bond);
|
bond_set_carrier(bond);
|
||||||
|
|
||||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||||
slave_dev->npinfo = bond_netpoll_info(bond);
|
slave_dev->npinfo = bond->dev->npinfo;
|
||||||
if (slave_dev->npinfo) {
|
if (slave_dev->npinfo) {
|
||||||
if (slave_enable_netpoll(new_slave)) {
|
if (slave_enable_netpoll(new_slave)) {
|
||||||
read_unlock(&bond->lock);
|
read_unlock(&bond->lock);
|
||||||
|
|
Loading…
Add table
Reference in a new issue