From patchwork Wed Oct 7 20:59:28 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Nicolas_de_Peslo=C3=BCan?= X-Patchwork-Id: 35369 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 81DE4B7B65 for ; Thu, 8 Oct 2009 08:06:05 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934378AbZJGVAW (ORCPT ); Wed, 7 Oct 2009 17:00:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934376AbZJGVAV (ORCPT ); Wed, 7 Oct 2009 17:00:21 -0400 Received: from smtp6-g21.free.fr ([212.27.42.6]:34669 "EHLO smtp6-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934366AbZJGVAU (ORCPT ); Wed, 7 Oct 2009 17:00:20 -0400 Received: from smtp6-g21.free.fr (localhost [127.0.0.1]) by smtp6-g21.free.fr (Postfix) with ESMTP id 15223E08187; Wed, 7 Oct 2009 22:59:31 +0200 (CEST) Received: from localhost.localdomain (eab95-4-88-175-177-37.fbx.proxad.net [88.175.177.37]) by smtp6-g21.free.fr (Postfix) with ESMTP id F0B48E08035; Wed, 7 Oct 2009 22:59:28 +0200 (CEST) From: =?utf-8?q?Nicolas=20de=20Peslo=C3=BCan?= To: fubar@us.ibm.com, davem@davemloft.net Cc: netdev@vger.kernel.org, bonding-devel@lists.sourceforge.net Subject: [PATCH netnext-2.6] bonding: remove useless assignment Date: Wed, 7 Oct 2009 22:59:28 +0200 Message-Id: <1254949168-12404-2-git-send-email-nicolas.2p.debian@free.fr> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1254949168-12404-1-git-send-email-nicolas.2p.debian@free.fr> References: <1254949168-12404-1-git-send-email-nicolas.2p.debian@free.fr> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Reviewed-by: Jiri Pirko --- drivers/net/bonding/bond_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 20dc5a2..34bdea5 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 */