Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp6271585pxb; Thu, 27 Jan 2022 10:01:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzXflJj7YfY9bAimlhpuD3TlNKLCtn41yz0e4em2Ytg/ilxvqtAh/kQon+b7HjD3m6zAT7Z X-Received: by 2002:a17:906:c149:: with SMTP id dp9mr3841008ejc.57.1643306476409; Thu, 27 Jan 2022 10:01:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643306476; cv=none; d=google.com; s=arc-20160816; b=CpXrvNBJedD8WYlW8+TloQm3JernhAFgkcStporHAVT0TTe/oLT4hVJGjUGFF7nPK2 HlK7A8g4Nq54v9O/6r6dj95KaBkP+C8hCgUxsoW87WPCxYH4wIngXPTVmHuFIfG8Vwds neknhQ3Ec5gy0yvKeZgpdfsRHIz4tuZAOIDwtOZtm57qy0SlX+9D0Xlkugwmw5oRBw/0 iRwH8LtUxTvOlusv4hs+E+4zWtJsq7uLCkAMM/HmR++JxmWMo58oZnuafJRfWUNqZkZ5 CSo/Gd/v5HaIxTYOInpWagzPzb2HTPmZuOL3ZvqmpR7fXqMy5HVaqzq1V1WCtF30TJCN ielQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=v7ONRIpoyxdDryFQT8nsLBqMxlHq+v2ykMo0wTfVZKI=; b=hXn22Y0Ro9GDk2BZbiCGEAXLxUY2grZ6liR/tEr8xM7Cvp1tBIin1ZKure0FBeKfsl SMVY5OPXL3hAH6EvEvA1vMdnd+YncrenBqPeHdx6iSgrfrTwViISW16Qjqmtuc4SaBIg XurM5WL0gw9+HXdG4JFMcSP7oQ9fiOBNCQnbnB71H/Q1acMwWUkd+0NHKPXOwTaN8SW2 A5xpGttwo8MLvRrOkqIwzrh+fjNwXOpmDDVVQ9MFJr8jGlUlwPf3MBMJ8M7z8gy1jkdP HyFFz9DPSQWCjmYWNPWjuYPe+bMd/v71mi6+Jrf9pLHKnHPPQWScE8bgdz0HeaOBGZa0 Vh8A== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v21si1972098edc.273.2022.01.27.10.00.48; Thu, 27 Jan 2022 10:01:16 -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; 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235360AbiA0KnQ (ORCPT + 99 others); Thu, 27 Jan 2022 05:43:16 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]:4522 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230404AbiA0KnP (ORCPT ); Thu, 27 Jan 2022 05:43:15 -0500 Received: from fraeml740-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Jkxxh3gT4z6H8VV; Thu, 27 Jan 2022 18:42:48 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml740-chm.china.huawei.com (10.206.15.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Thu, 27 Jan 2022 11:43:13 +0100 Received: from [10.47.26.192] (10.47.26.192) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Thu, 27 Jan 2022 10:43:12 +0000 Subject: Re: [PATCH 01/16] scsi: libsas: Use enum for response frame DATAPRES field To: Christoph Hellwig CC: , , , , , , , , , , , , , References: <1643110372-85470-1-git-send-email-john.garry@huawei.com> <1643110372-85470-2-git-send-email-john.garry@huawei.com> From: John Garry Message-ID: Date: Thu, 27 Jan 2022 10:42:38 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.26.192] X-ClientProxiedBy: lhreml713-chm.china.huawei.com (10.201.108.64) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/01/2022 10:19, Christoph Hellwig wrote: > 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? > . ok, I can include that suggestion. Thanks, John