From patchwork Tue Oct 26 10:25:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 69214 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 D0E8EB6EE9 for ; Tue, 26 Oct 2010 21:19:39 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759517Ab0JZKS1 (ORCPT ); Tue, 26 Oct 2010 06:18:27 -0400 Received: from mgw2.diku.dk ([130.225.96.92]:60787 "EHLO mgw2.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759481Ab0JZKSW (ORCPT ); Tue, 26 Oct 2010 06:18:22 -0400 Received: from localhost (localhost [127.0.0.1]) by mgw2.diku.dk (Postfix) with ESMTP id 525794DC0F2; Tue, 26 Oct 2010 12:18:21 +0200 (CEST) Received: from mgw2.diku.dk ([127.0.0.1]) by localhost (mgw2.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 31820-18; Tue, 26 Oct 2010 12:18:20 +0200 (CEST) Received: from palace.topps.diku.dk (palace.ekstranet.diku.dk [192.38.115.202]) by mgw2.diku.dk (Postfix) with ESMTP id C8A9A4DC0F9; Tue, 26 Oct 2010 12:18:14 +0200 (CEST) From: Julia Lawall To: Karsten Keil Cc: kernel-janitors@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/14] drivers/isdn: delete double assignment Date: Tue, 26 Oct 2010 12:25:39 +0200 Message-Id: <1288088743-3725-11-git-send-email-julia@diku.dk> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1288088743-3725-1-git-send-email-julia@diku.dk> References: <1288088743-3725-1-git-send-email-julia@diku.dk> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Julia Lawall Delete successive assignments to the same location. In the first case, the hscx array has two elements, so change the assignment to initialize the second one. In the second case, the two assignments are simply identical. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression i; @@ *i = ...; i = ...; // Signed-off-by: Julia Lawall --- In the first case, the patch changes the semantics and has not been tested. drivers/isdn/hardware/mISDN/mISDNinfineon.c | 2 +- drivers/isdn/hisax/l3_1tr6.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) -- 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 diff --git a/drivers/isdn/hardware/mISDN/mISDNinfineon.c b/drivers/isdn/hardware/mISDN/mISDNinfineon.c index af25e1f..e90db88 100644 --- a/drivers/isdn/hardware/mISDN/mISDNinfineon.c +++ b/drivers/isdn/hardware/mISDN/mISDNinfineon.c @@ -563,7 +563,7 @@ reset_inf(struct inf_hw *hw) mdelay(10); hw->ipac.isac.adf2 = 0x87; hw->ipac.hscx[0].slot = 0x1f; - hw->ipac.hscx[0].slot = 0x23; + hw->ipac.hscx[1].slot = 0x23; break; case INF_GAZEL_R753: val = inl((u32)hw->cfg.start + GAZEL_CNTRL); diff --git a/drivers/isdn/hisax/l3_1tr6.c b/drivers/isdn/hisax/l3_1tr6.c index b0554f8..a5c76fc 100644 --- a/drivers/isdn/hisax/l3_1tr6.c +++ b/drivers/isdn/hisax/l3_1tr6.c @@ -164,8 +164,6 @@ l3_1tr6_setup(struct l3_process *pc, u_char pr, void *arg) char tmp[80]; struct sk_buff *skb = arg; - p = skb->data; - /* Channel Identification */ p = skb->data; if ((p = findie(p, skb->len, WE0_chanID, 0))) {