* [PATCH net-next-2.6] bonding: remove useless assignment
@ 2009-10-07 20:06 Nicolas de Pesloüan
2009-10-07 20:24 ` [Bonding-devel] " Nicolas de Pesloüan
2009-10-07 20:54 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Nicolas de Pesloüan @ 2009-10-07 20:06 UTC (permalink / raw)
To: netdev; +Cc: David Miller, Jay Vosburgh, bonding-devel
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>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
---
Resent after fixing tab to space corruption.
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 */
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [Bonding-devel] [PATCH net-next-2.6] bonding: remove useless assignment
2009-10-07 20:06 [PATCH net-next-2.6] bonding: remove useless assignment Nicolas de Pesloüan
@ 2009-10-07 20:24 ` Nicolas de Pesloüan
2009-10-07 20:54 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Nicolas de Pesloüan @ 2009-10-07 20:24 UTC (permalink / raw)
To: netdev; +Cc: Jay Vosburgh, David Miller, bonding-devel
Nicolas de Pesloüan 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.
>
> Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
> Reviewed-by: Jiri Pirko <jpirko@redhat.com>
>
> ---
>
> Resent after fixing tab to space corruption.
>
> 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 */
Apparently still some issues with patch formating. I will investigate this and post later.
Nicolas.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net-next-2.6] bonding: remove useless assignment
2009-10-07 20:06 [PATCH net-next-2.6] bonding: remove useless assignment Nicolas de Pesloüan
2009-10-07 20:24 ` [Bonding-devel] " Nicolas de Pesloüan
@ 2009-10-07 20:54 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2009-10-07 20:54 UTC (permalink / raw)
To: nicolas.2p.debian; +Cc: netdev, fubar, bonding-devel
From: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Date: Wed, 07 Oct 2009 22:06:45 +0200
> Resent after fixing tab to space corruption.
It's still breaking up long lines, two examples:
> diff --git 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)
Please fix this and resubmit.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-07 20:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-07 20:06 [PATCH net-next-2.6] bonding: remove useless assignment Nicolas de Pesloüan
2009-10-07 20:24 ` [Bonding-devel] " Nicolas de Pesloüan
2009-10-07 20:54 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.