Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754961Ab0APP7H (ORCPT ); Sat, 16 Jan 2010 10:59:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754583Ab0APP7E (ORCPT ); Sat, 16 Jan 2010 10:59:04 -0500 Received: from mgw2.diku.dk ([130.225.96.92]:44183 "EHLO mgw2.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753911Ab0APP7A (ORCPT ); Sat, 16 Jan 2010 10:59:00 -0500 Date: Sat, 16 Jan 2010 16:58:58 +0100 (CET) From: Julia Lawall To: Jing Huang , "James E.J. Bottomley" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 5/9] drivers/scsi: Eliminate useless code Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Julia Lawall The variable bfa_itnim 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/scsi/bfa/bfad_im.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c index f788c2a..37b0fa1 100644 --- a/drivers/scsi/bfa/bfad_im.c +++ b/drivers/scsi/bfa/bfad_im.c @@ -243,9 +243,8 @@ bfad_im_target_reset_send(struct bfad_s *bfad, struct scsi_cmnd *cmnd, struct bfa_itnim_s *bfa_itnim; bfa_status_t rc = BFA_STATUS_OK; - bfa_itnim = bfa_fcs_itnim_get_halitn(&itnim->fcs_itnim); tskim = bfa_tskim_alloc(&bfad->bfa, (struct bfad_tskim_s *) cmnd); if (!tskim) { BFA_DEV_PRINTF(bfad, BFA_ERR, -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/