Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1623705imm; Wed, 1 Aug 2018 20:47:07 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfnKVWwLk4as/miLHXi1atNmlvSLVA4nqa2J66BoLSrR3xHA/dAGQQMJ1/zbEvt/Q2D4Nq0 X-Received: by 2002:a62:9dcc:: with SMTP id a73-v6mr1051738pfk.249.1533181627155; Wed, 01 Aug 2018 20:47:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533181627; cv=none; d=google.com; s=arc-20160816; b=C56wX7fik706idmYwEbANWw5zWWaVqP+qsl/xGakHgv4HuB9pJE1ngOiypFvcyYTW9 P6sn03OlNcA8recqaklgepRMe4orNHzLk3bplUSxZ3m9UZPSUY9FNiQg7m3SmmbjJhHT U5vg0lg72JO2hj0dABOkdqXProlNcUWo+AiqKzcVWm26zlJ6veFZyZZE64dC8ImXiaCi 0R2ybiknJrnU0ArcjDZabKN3RgdWwCBWdcs0WJ+sbt48PdkG6WFXZbVTouddi3AmopaN 3jpG7rlByj8uD+eHB0UmHiyJfbX82JJXOpEND0RetNcJuCSHhBEcZjf9jHsrGon+gv+5 MW7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id:arc-authentication-results; bh=VHiU89xyQr/5Mx7uh7YtSgzcmIlujIt06mvY1muNUYo=; b=vA8Gtr8StJDXoYuO2lMWPtORUD9NJYitYufJkQ7yuu5lbgHdatbdmdN/hKb1WuHqAn 0iRseneyQTw+rYrng5pjQo5VscpRxtpzEt/luCK5eB5VF44xBZjybYG1Z97z/DAlWz27 M1L06EGiXiu1dP4ZUUlSWoEQqgB+OrbKLZZCHW+T5GkB46rnkpe34YqGV17CJnOrv65O Ndul/GK6vaNNNYaM0n/w++DyuMVqJCqfaBqA68tlPHcbq/jmtN4EszjpyMm2bU6Iqbsp DRSXa/HSbtLMElgbKrHpnAHc5MRBJ+ivVnIPfP7JAA3VqkffvjaOVrF3Uzac5ULjPtd1 P5Eg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q18-v6si590114plr.134.2018.08.01.20.46.52; Wed, 01 Aug 2018 20:47:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726455AbeHBFfI (ORCPT + 99 others); Thu, 2 Aug 2018 01:35:08 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:10608 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726042AbeHBFfI (ORCPT ); Thu, 2 Aug 2018 01:35:08 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 097F3D4FB405C; Thu, 2 Aug 2018 11:46:00 +0800 (CST) Received: from [127.0.0.1] (10.177.29.68) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.399.0; Thu, 2 Aug 2018 11:45:55 +0800 Message-ID: <5B627E71.5020600@huawei.com> Date: Thu, 2 Aug 2018 11:45:53 +0800 From: zhong jiang User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Bart Van Assche CC: "jejb@linux.vnet.ibm.com" , "martin.petersen@oracle.com" , "fthain@telegraphics.com.au" , "schmitzmic@gmail.com" , "andy.shevchenko@gmail.com" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "john.garry@huawei.com" Subject: Re: [PATCH] scsi:NCR5380: remove same check condition in NCR5380_select References: <1533179408-20631-1-git-send-email-zhongjiang@huawei.com> In-Reply-To: Content-Type: text/plain; charset="UTF-7" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.29.68] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/8/2 11:26, Bart Van Assche wrote: > On Thu, 2018-08-02 at 11:10 +ACs-0800, zhong jiang wrote: >> The same check condition is redundant, so remove one of them. >> >> Signed-off-by: zhong jiang >> --- >> drivers/scsi/NCR5380.c +AHw- 3 +ACs--- >> 1 file changed, 1 insertion(+ACs-), 2 deletions(-) >> >> diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c >> index 90ea0f5..2ecaf3f 100644 >> --- a/drivers/scsi/NCR5380.c >> +ACsAKwAr- b/drivers/scsi/NCR5380.c >> +AEAAQA- -999,8 +ACs-999,7 +AEAAQA- static struct scsi+AF8-cmnd +ACo-NCR5380+AF8-select(struct Scsi+AF8-Host +ACo-instance, >> >> /+ACo- Check for lost arbitration +ACo-/ >> if ((NCR5380+AF8-read(INITIATOR+AF8-COMMAND+AF8-REG) +ACY- ICR+AF8-ARBITRATION+AF8-LOST) +AHwAfA- >> - (NCR5380+AF8-read(CURRENT+AF8-SCSI+AF8-DATA+AF8-REG) +ACY- hostdata->id+AF8-higher+AF8-mask) +AHwAfA- >> - (NCR5380+AF8-read(INITIATOR+AF8-COMMAND+AF8-REG) +ACY- ICR+AF8-ARBITRATION+AF8-LOST)) +AHs- >> +ACs- (NCR5380+AF8-read(CURRENT+AF8-SCSI+AF8-DATA+AF8-REG) +ACY- hostdata->id+AF8-higher+AF8-mask)) +AHs- >> NCR5380+AF8-write(MODE+AF8-REG, MR+AF8-BASE); >> dsprintk(NDEBUG+AF8-ARBITRATION, instance, "lost arbitration, deasserting MR+AF8-ARBITRATE+AFw-n"); >> spin+AF8-lock+AF8-irq(+ACY-hostdata->lock); > Has this patch been tested? I check the issue by doubletest.cocci. Just review the code by myself. Maybe I miss something else. please tell let me know if you any objection. Thanks zhong jiang > Thanks, > > Bart. > > >