From: Jiri Pirko <jpirko@redhat.com>
To: "Nicolas de Pesloüan" <nicolas.2p.debian@free.fr>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
Jay Vosburgh <fubar@us.ibm.com>,
bonding-devel@lists.sourceforge.net
Subject: Re: [PATCH net-next-2.6] bonding: remove useless assignment
Date: Mon, 5 Oct 2009 16:52:05 +0200 [thread overview]
Message-ID: <20091005145205.GE7035@psychotron.lab.eng.brq.redhat.com> (raw)
In-Reply-To: <4AB67242.6060803@free.fr>
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
next prev parent reply other threads:[~2009-10-05 14:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-20 18:19 [PATCH net-next-2.6] bonding: remove useless assignment Nicolas de Pesloüan
2009-10-05 14:52 ` Jiri Pirko [this message]
2009-10-07 8:05 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2009-10-07 20:06 Nicolas de Pesloüan
2009-10-07 20:54 ` 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=20091005145205.GE7035@psychotron.lab.eng.brq.redhat.com \
--to=jpirko@redhat.com \
--cc=bonding-devel@lists.sourceforge.net \
--cc=davem@davemloft.net \
--cc=fubar@us.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.2p.debian@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).