From patchwork Sat Jan 16 15:57:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 43011 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.180.67]) by ozlabs.org (Postfix) with ESMTP id 16005B7CE6 for ; Sun, 17 Jan 2010 02:58:50 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754543Ab0APP6H (ORCPT ); Sat, 16 Jan 2010 10:58:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754717Ab0APP6B (ORCPT ); Sat, 16 Jan 2010 10:58:01 -0500 Received: from mgw1.diku.dk ([130.225.96.91]:42631 "EHLO mgw1.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753542Ab0APP56 (ORCPT ); Sat, 16 Jan 2010 10:57:58 -0500 Received: from localhost (localhost [127.0.0.1]) by mgw1.diku.dk (Postfix) with ESMTP id 2CBD052C389; Sat, 16 Jan 2010 16:57:58 +0100 (CET) X-Virus-Scanned: amavisd-new at diku.dk Received: from mgw1.diku.dk ([127.0.0.1]) by localhost (mgw1.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BYL7byQMylC5; Sat, 16 Jan 2010 16:57:56 +0100 (CET) Received: from nhugin.diku.dk (nhugin.diku.dk [130.225.96.140]) by mgw1.diku.dk (Postfix) with ESMTP id EE1A652C35B; Sat, 16 Jan 2010 16:57:56 +0100 (CET) Received: from ask.diku.dk (ask.diku.dk [130.225.96.225]) by nhugin.diku.dk (Postfix) with ESMTP id DF68A6DF835; Sat, 16 Jan 2010 16:53:20 +0100 (CET) Received: by ask.diku.dk (Postfix, from userid 3767) id D654D4E7C; Sat, 16 Jan 2010 16:57:56 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by ask.diku.dk (Postfix) with ESMTP id D13204E1A; Sat, 16 Jan 2010 16:57:56 +0100 (CET) Date: Sat, 16 Jan 2010 16:57:56 +0100 (CET) From: Julia Lawall To: Ron Mercer , linux-driver@qlogic.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 3/9] drivers/net: Eliminate useless code Message-ID: MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Julia Lawall The variable qdev is initialized twice to the same (side effect-free) expression. Drop one initialization. A simplified version of the semantic match that finds this problem is: (http://coccinelle.lip6.fr/) // @forall@ idexpression *x; identifier f!=ERR_PTR; @@ x = f(...) ... when != x ( x = f(...,<+...x...+>,...) | * x = f(...) ) // Signed-off-by: Julia Lawall --- drivers/net/qla3xxx.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index f922294..4ef0afb 100644 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c @@ -4087,9 +4087,8 @@ static void __devexit ql3xxx_remove(struct pci_dev *pdev) struct ql3_adapter *qdev = netdev_priv(ndev); unregister_netdev(ndev); - qdev = netdev_priv(ndev); ql_disable_interrupts(qdev); -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org