bonding: remove useless assignment
Subsystems (3)
PATCH 1/1 bonding: remove useless assignment
The variable old_active is first set to bond->curr_active_slave. Then, it is unconditionally set to new_active, without being used in between.
The first assignment, having no side effect, is useless.
---
drivers/net/bonding/bond_main.c +1 -1
@@ -1084,7 +1084,7 @@ static struct slave *bond_find_best_slave(struct bonding *bond)int mintime = bond->params.updelay;int i; - new_active = old_active = bond->curr_active_slave; + new_active = bond->curr_active_slave;if (!new_active) {/* there were no active slaves left */ if (bond->slave_cnt >0 )/* found one slave */
Quoted 4 lines · Sun, Sep 20, 2009 at 08:19:46PM CEST, [email protected] wrote:
The variable
old_activeis first set tobond->curr_active_slave. Then, it is unconditionally set tonew_active, without being used in between.The first assignment, having no side effect, is useless.
Correct.
Quoted 2 lines
Signed-off-by Nicolas de Pesloüan <[email protected]>
Quoted 20 lines
---
drivers/net/bonding/bond_main.c +1
-2@@ -1084,7 +1084,7 @@ static struct slave *bond_find_best_slave(struct bonding *bond)int mintime = bond->params.updelay;int i; - new_active = old_active = bond->curr_active_slave; + new_active = bond->curr_active_slave;if (!new_active) {/* there were no active slaves left */ if (bond->slave_cnt >0 )/* found one slave */ --To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
David Miller
maintainerFrom: Nicolas de Pesloüan <[email protected]>
Date: Sun, 20 Sep 2009 20:19:46 +0200
Quoted 7 lines
The variable
old_activeis first set tobond->curr_active_slave. Then, it is unconditionally set tonew_active, without being used in between.The first assignment, having no side effect, is useless.
Signed-off-by Nicolas de Pesloüan <[email protected]>
Nicolas, all of your patches are corrupts by your email client. It breaks up long lines and transforms tab characters into spaces.
Please correct this, and resubmit all of your pending patches.
Thank you.