Skip to contentSkip to conversation

bonding: remove the redundant judgements for bond_set_mac_address()

PATCH In review Ding Tianhong 1 participant 1 message Jan 21, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 5/5 bonding: remove the redundant judgements for bond_set_mac_address()

The dev_set_mac_address() will check the dev->netdev_ops->ndo_set_mac_address, so no need to check it in bond_set_mac_address().

---
 drivers/net/bonding/bond_main.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/net/bonding/bond_main.c +0 -8
index a318a78..638e1d5 100644
@@ -3500,15 +3500,7 @@ static int bond_set_mac_address(struct net_device *bond_dev, void *addr)
 	 */
 
 	bond_for_each_slave(bond, slave, iter) {
-		const struct net_device_ops *slave_ops = slave->dev->netdev_ops;
 		pr_debug("slave %p %s\n", slave, slave->dev->name);
-
-		if (slave_ops->ndo_set_mac_address == NULL) {
-			res = -EOPNOTSUPP;
-			pr_debug("EOPNOTSUPP %s\n", slave->dev->name);
-			goto unwind;
-		}
-
 		res = dev_set_mac_address(slave->dev, addr);
 		if (res) {
 			/* TODO: consider downing the slave
Signature · 1 line
1.8.0