From: "Nicolas de Pesloüan" <nicolas.2p.debian@free•fr>
To: netdev@vger•kernel.org
Cc: David Miller <davem@davemloft•net>,
Jay Vosburgh <fubar@us•ibm.com>,
bonding-devel@lists•sourceforge.net
Subject: [PATCH net-next-2.6] bonding: remove useless assignment
Date: Wed, 07 Oct 2009 22:06:45 +0200 [thread overview]
Message-ID: <4ACCF4D5.9050502@free.fr> (raw)
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 */
next reply other threads:[~2009-10-07 20:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-07 20:06 Nicolas de Pesloüan [this message]
2009-10-07 20:24 ` [Bonding-devel] [PATCH net-next-2.6] bonding: remove useless assignment Nicolas de Pesloüan
2009-10-07 20:54 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2009-09-20 18:19 Nicolas de Pesloüan
2009-10-05 14:52 ` Jiri Pirko
2009-10-07 8:05 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ACCF4D5.9050502@free.fr \
--to=nicolas.2p.debian@free$(echo .)fr \
--cc=bonding-devel@lists$(echo .)sourceforge.net \
--cc=davem@davemloft$(echo .)net \
--cc=fubar@us$(echo .)ibm.com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox