Message ID | 4AB67242.6060803@free.fr |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
Sun, Sep 20, 2009 at 08:19:46PM CEST, nicolas.2p.debian@free.fr wrote: > 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. Correct. > > Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> Reviewed-by: Jiri Pirko <jpirko@redhat.com> > > --- > > diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c > index a7e731f..fce7233 100644 > --- a/drivers/net/bonding/bond_main.c > +++ b/drivers/net/bonding/bond_main.c > @@ -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 majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> Date: Sun, 20 Sep 2009 20:19:46 +0200 > 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. > > Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> 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. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index a7e731f..fce7233 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -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 */
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. Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html