Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1507428imm; Fri, 6 Jul 2018 01:07:35 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeKdHK8ZlyT0/mqjxfEdr1UzbPyjzrbnpEXsv31KrNfkYwEU4XB1qYYdC0d/wcU7CvvT/jB X-Received: by 2002:a62:a119:: with SMTP id b25-v6mr8187021pff.163.1530864455501; Fri, 06 Jul 2018 01:07:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530864455; cv=none; d=google.com; s=arc-20160816; b=oc8nfNDYd3SE1ZRGC7tcsaow3dzOFjJ0l4K4cGl+EZ2PN8w3Z3tXe8fpKdcn76WPBg lWNuZq7ePA/lSB+VasKKssZYAhkevP4r0lg11T0MYY1hQJH/MjurHoLDTD940cSx9u/r XGI1MfzfPKLEjULd6kyeVQylTzXgW4pB1klGLbY2tByHvd/SX43Q/iDslw3mtbocTM95 0wjKVVvDyf4/bhjMFlUXhZGX3zZllY3IyQpW4hluNTJGqIT7ZMdynm28AzhXViM4pJFj KixAfFeVNRLHoA+jOfq7vuL5F+hz3FQFk8kr0MXkFDhO62SU6SIwJQiUAm7Papj4LzN/ jGsw== 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=JD9krw1TD4V0JOzOZUQofeWRbbGEj4TUBBuvzKb+YYo=; b=0ImHp+VJkqbneEvSZSUYZgjaMW+PCLX2xTNVURNTqvd14aOxdvj3SZmCe/0NLz/M5c 71hIcbGeT3+iE4mBpHmeYLADvncxG4gjKer7Btvum6BIj7NxkiYqCDjKWLRC2D+Z5nd4 MGN9x7T9NbgaoW3Qf15hHgegxvoyhFi/SVkPFqHsNs3J2no4x+sF64BjQxD7E4r43faO Mon2fW+MGzLwnVA2mp+LGo+BvdYk54pGSkol+nF+lpbwDcqAR+SY+JL9U89B/uVlXeqb 47m5xz1aeWUWfLdLrr4BiPQ8IZDoBTQ9njOHJF8QEmm4cHMqbHWbRGX6Zy1fCrd+4s6v EIgw== 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 w1-v6si6205366pgo.87.2018.07.06.01.07.20; Fri, 06 Jul 2018 01:07:35 -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 S1753810AbeGFIEw (ORCPT + 99 others); Fri, 6 Jul 2018 04:04:52 -0400 Received: from mx2.suse.de ([195.135.220.15]:55512 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751763AbeGFIEt (ORCPT ); Fri, 6 Jul 2018 04:04:49 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 27D18AD97; Fri, 6 Jul 2018 08:04:48 +0000 (UTC) Date: Fri, 6 Jul 2018 10:04:47 +0200 From: Johannes Thumshirn To: Bart Van Assche Cc: "martin.petersen@oracle.com" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "RaghavaAditya.Renukunta@microsemi.com" , "david.carroll@microsemi.com" Subject: Re: [PATCH 1/4] scsi: aacraid: remove AAC_STAT_GOOD define Message-ID: <20180706080447.2u3iptpnvmso6ncc@linux-x5ow.site> References: <20180705110140.19545-1-jthumshirn@suse.de> <20180705110140.19545-2-jthumshirn@suse.de> 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 Thu, Jul 05, 2018 at 05:24:23PM +0000, Bart Van Assche wrote: > On Thu, 2018-07-05 at 13:01 +0200, Johannes Thumshirn wrote: > > if (((aac_cache & 6) == 6) && dev->cache_protected) { > > - scsicmd->result = AAC_STAT_GOOD; > > + scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | > > + SAM_STAT_GOOD; > > Does AAC_STAT_GOOD really have to be expanded in full multiple times? > Have you considered to replace AAC_STAT_GOOD by the numerical constant > 0 instead? This won't work anymore once we start splitting ->result into 4 unrelated enums. That's why I prefer this way. Byte, Johannes -- 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