Skip to content

Commit 10eccb4

Browse files
shemmingerdavem330
authored andcommitted
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>
1 parent 0fb52a2 commit 10eccb4

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,12 +1245,6 @@ static int bond_netpoll_setup(struct net_device *dev, struct netpoll_info *ni, g
12451245
}
12461246
return err;
12471247
}
1248-
1249-
static struct netpoll_info *bond_netpoll_info(struct bonding *bond)
1250-
{
1251-
return bond->dev->npinfo;
1252-
}
1253-
12541248
#else
12551249
static inline int slave_enable_netpoll(struct slave *slave)
12561250
{
@@ -1795,7 +1789,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
17951789
bond_set_carrier(bond);
17961790

17971791
#ifdef CONFIG_NET_POLL_CONTROLLER
1798-
slave_dev->npinfo = bond_netpoll_info(bond);
1792+
slave_dev->npinfo = bond->dev->npinfo;
17991793
if (slave_dev->npinfo) {
18001794
if (slave_enable_netpoll(new_slave)) {
18011795
read_unlock(&bond->lock);

0 commit comments

Comments
 (0)