Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp231648imm; Mon, 9 Jul 2018 00:16:17 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdS3hxxQj3HwbgSe5EUaNxX/spFt/RgMzY/LW5/ixI4kAioMw9WeWiJhEObEGU+yZrVX4Y8 X-Received: by 2002:a17:902:292b:: with SMTP id g40-v6mr19672808plb.273.1531120577801; Mon, 09 Jul 2018 00:16:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531120577; cv=none; d=google.com; s=arc-20160816; b=yOa584BYC0knsYN9TszmWuhmnA/oQKeiwpQcEvsRs0+S7z82D+rwWAOAK47yMim2oC BD8Sc+Tuf1xxZ9hr2uguh6V7IynH2BczmKibutHjkJzFYlmLbHtgTMVUP1nkDQAV1/lH yV5+HyD5p/I6mSBn4PQD5L4stwoHG0bzNeJqcd//PywL8tigW1J/eJX2VNQF3ni1rKXc qH2Qxo+RZFBHpAROiGsV2JKSpmjiS+UYzlIWTQqRAYb4H2bQRrG2zBTA+DrjL3LfKzQ9 zc6c1l1RN2FyKT6HpWGAYf5TqVjeFF8i/FSAP+6J/FmMX94D4YqFpQjm5wJc6UY99wKm NVCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=A/o1eq0PK3P1cOkbEmHkQ7RlCW/W4/BoS6t9JqqtTwM=; b=AGr40ApSfO+iswE+FDiQUispkZ3MpyuwT0GCvoaa1/UewgPAWPe3iGQ1PkQOLi9fQB 6wzJ1HP41BeLPGfFxdeTFuAgztt+jJ6HLiAHYzst0cNUhaDAT5Gf3gvkHWHnPjkKPgRw N/7MWWFJZi87FeOGSPzN3+ZX8OZ3vZSgbXR6tspWtby784eGkMkuzXMwDy4je/VScSxS 1OgxA/4oQRKGfJy95kjKqRe7E1C1+OXzfiFDaAc2RK78YE1mt2AXMK3I732QBWNAJb+o gKfNupS4YWLkUXs6gSUA/ZG6c7tzHpdDKJ+iOB5UZovGgSgLU0dwYeFpAdhG6e2SA7ps bEwQ== 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 j22-v6si13739812pll.353.2018.07.09.00.16.01; Mon, 09 Jul 2018 00:16:17 -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 S1754142AbeGIHPU (ORCPT + 99 others); Mon, 9 Jul 2018 03:15:20 -0400 Received: from mx2.suse.de ([195.135.220.15]:57452 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751169AbeGIHPS (ORCPT ); Mon, 9 Jul 2018 03:15:18 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7B269AF51; Mon, 9 Jul 2018 07:15:17 +0000 (UTC) Date: Mon, 9 Jul 2018 09:15:16 +0200 From: Johannes Thumshirn To: Bart Van Assche Cc: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "martin.petersen@oracle.com" Subject: Re: [PATCH 4/4] scsi: ncr53c8xx: remove ScsiResult macro Message-ID: <20180709071516.oigjx5wetjqlvqpb@linux-x5ow.site> References: <20180705110140.19545-1-jthumshirn@suse.de> <20180705110140.19545-5-jthumshirn@suse.de> <20180706080939.iotmgb24f6iaawkp@linux-x5ow.site> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 06, 2018 at 05:05:19PM +0000, Bart Van Assche wrote: > On Fri, 2018-07-06 at 10:09 +0200, Johannes Thumshirn wrote: > > On Thu, Jul 05, 2018 at 05:04:05PM +0000, Bart Van Assche wrote: > > > On Thu, 2018-07-05 at 13:01 +0200, Johannes Thumshirn wrote: > > > > - cmd->result = ScsiResult(DID_OK, S_CHECK_COND); > > > > + cmd->result = DID_OK << 16 | S_CHECK_COND; > > > > > > Since DID_OK == 0, do we really need "DID_OK << 16 |" here? > > > > Please see my answers to the other patches on this. > > No matter what the next step is, you will have to deal with code that looks > very similar to what I proposed. An example from libata: > > else if (qc->flags & ATA_QCFLAG_SENSE_VALID) > cmd->result = SAM_STAT_CHECK_CONDITION; OK, I'll take remove the "| 0" parts. > > BTW, in drivers/scsi/sym53c8xx_2/sym_defs.h there are definitions for synonyms > of standard SCSI constants. I wouldn't mind if these synonyms would be removed: > > #define S_GOOD SAM_STAT_GOOD > #define S_CHECK_COND SAM_STAT_CHECK_CONDITION > #define S_COND_MET SAM_STAT_CONDITION_MET > #define S_BUSY SAM_STAT_BUSY > #define S_INT SAM_STAT_INTERMEDIATE > #define S_INT_COND_MET SAM_STAT_INTERMEDIATE_CONDITION_MET > #define S_CONFLICT SAM_STAT_RESERVATION_CONFLICT > #define S_TERMINATED SAM_STAT_COMMAND_TERMINATED > #define S_QUEUE_FULL SAM_STAT_TASK_SET_FULL Yup, saw those as well and already removed them in the next version. Ditto for the bfa ones. -- Johannes Thumshirn Storage jthumshirn@suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850