Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp6269615pxb; Thu, 27 Jan 2022 09:58:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAJEI0yfTdGriMRmaqPj6xA0mw0eJtyAt85u04xDkAMBebCCO3EIeRk3D0yzdzre7+kY2I X-Received: by 2002:a05:6402:f0c:: with SMTP id i12mr4760322eda.156.1643306323571; Thu, 27 Jan 2022 09:58:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643306323; cv=none; d=google.com; s=arc-20160816; b=feuqGtsVZvedzQQ609y6z4lXKZX1XjuSVJVhbOBxChOHTgbi88ZokTc1LUOD74M7xI ZXuXrt4sMQDMS0o5/lbWR9+UwZq93VXulkk2bapwNFsZrPjlPit9bIPkuTua5zXl0qmc ovcXAW8psA9IYX6PZx0OQlIKf/fy2CJBrtGSzVC3taT6hOEqAXgIlXyVrVAYNv98vxsH gawsHZhMWXBP4gso5NPRGKZKy5XXDLSuxwDry1kZWKrw/GS1iaapRZchzQ8XQWutnjmy ZG6M5clm9mFxQXh9MncQQZfLHZPtIaFTQ8kLP1MF6SFPE4m8D6O2aa23AZ9BnmDWvC68 oEzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YUUBevVBgRoXIADyQTeoZhGAF340Wfzy2ybkVfz5WH8=; b=uPOS51GCocdBvide44D1bD3Mu9ll2bDtKL3lL3m+G66iJeONCOooBQJv68qB1T3Ucx 6eMf1UJYNlR2MbytUzBArz0tg5kzOP2I39uX+k1tKv8zLqTI4mQSIsqOYZF5AogsCpUz ec4+Hn2Bm1uxA1MdzkwAbdSDB+Iq8uSRUFdGlb3NVIraCl117OBwCOS/XIAIhxThg6LZ JsDk+R6HRlUVRgWVNpF+vY7l+0YqPG1ibfOuuI+s27iGoJLX8kYckpE0z4FMhWiwFVLI pP6cheBu2q4R58RjJYkauOnZEssnNsjwhTvz9bINrW14XWqUSblTM2MOut1JpkOcS8IA fV+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=d4kdl6DL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g3si1725948edb.630.2022.01.27.09.58.18; Thu, 27 Jan 2022 09:58:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=d4kdl6DL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239048AbiA0KUH (ORCPT + 99 others); Thu, 27 Jan 2022 05:20:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229516AbiA0KUG (ORCPT ); Thu, 27 Jan 2022 05:20:06 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EF60C061714; Thu, 27 Jan 2022 02:20:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=YUUBevVBgRoXIADyQTeoZhGAF340Wfzy2ybkVfz5WH8=; b=d4kdl6DLH52H0H3bXI8/YNWsGi gKbeDvgr5J1uEWXqANQ0xwiVtqWSPvBSU25MeYFlD8JgijoWOtNO27ZBDM1qyrdxBCek8Br+A+yYd GH/hhu2RUqhrtQoqJ0+flbQYGKJtUwRCd0x9juxU4yanRGopRDwQ7g/KEDkzdX1POTfovVdfjHIS7 4C+mVVUrbE6Ex1sjj69Zd3P3rNajRAOZBBUJgX2MgN5yjmKXHLwEg/cE4erYGSkPYruMPRTCS+a9q VjWdcjRzlsSZuZsY6EMl63ZNQpUA1HRNgHkpQUDlgFZpL7TFodsSP5L2AqZle+Emv4MwRg/uzo9n8 lAxP48kg==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nD1sk-00F84i-83; Thu, 27 Jan 2022 10:19:58 +0000 Date: Thu, 27 Jan 2022 02:19:58 -0800 From: Christoph Hellwig To: John Garry Cc: jejb@linux.ibm.com, martin.petersen@oracle.com, artur.paszkiewicz@intel.com, jinpu.wang@cloud.ionos.com, chenxiang66@hisilicon.com, Ajish.Koshy@microchip.com, yanaijie@huawei.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, linuxarm@huawei.com, liuqi115@huawei.com, Viswas.G@microchip.com, damien.lemoal@opensource.wdc.com Subject: Re: [PATCH 01/16] scsi: libsas: Use enum for response frame DATAPRES field Message-ID: References: <1643110372-85470-1-git-send-email-john.garry@huawei.com> <1643110372-85470-2-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1643110372-85470-2-git-send-email-john.garry@huawei.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 25, 2022 at 07:32:37PM +0800, John Garry wrote: > - if (iu->datapres == 0) > + if (iu->datapres == NO_DATA) > tstat->stat = iu->status; > - else if (iu->datapres == 1) > + else if (iu->datapres == RESPONSE_DATA) > tstat->stat = iu->resp_data[3]; > - else if (iu->datapres == 2) { > + else if (iu->datapres == SENSE_DATA) { Maybe use a switch here to make it more obvious?