From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759592Ab0JZKTB (ORCPT ); Tue, 26 Oct 2010 06:19:01 -0400 Received: from mgw2.diku.dk ([130.225.96.92]:60802 "EHLO mgw2.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759497Ab0JZKSZ (ORCPT ); Tue, 26 Oct 2010 06:18:25 -0400 From: Julia Lawall To: Jayamohan Kallickal Cc: kernel-janitors@vger.kernel.org, "James E.J. Bottomley" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/14] drivers/scsi/be2iscsi/be_main.c: delete double assignment Date: Tue, 26 Oct 2010 12:25:42 +0200 Message-Id: <1288088743-3725-14-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: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Julia Lawall Delete successive assignments to the same location. Initialize the pwrb_handle field instead of initializing the psgl_handle field twice. 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 --- This changes the semantics and has not been tested. drivers/scsi/be2iscsi/be_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 75a85aa..9e1878f 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -3794,7 +3794,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode) task->hdr = (struct iscsi_hdr *)&io_task->cmd_bhs->iscsi_hdr; task->hdr_max = sizeof(struct be_cmd_bhs); - io_task->psgl_handle = NULL; + io_task->pwrb_handle = NULL; io_task->psgl_handle = NULL; if (task->sc) {