Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp994494imu; Tue, 20 Nov 2018 09:57:19 -0800 (PST) X-Google-Smtp-Source: AJdET5eYZ4cqNNcSw4KR+lwIIvTK7t6wUzL1gmwKXnbA5iqFG+7EzFAXZQGQx5bg7qpNy19oQMs5 X-Received: by 2002:a63:dd55:: with SMTP id g21mr2757422pgj.86.1542736639937; Tue, 20 Nov 2018 09:57:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542736639; cv=none; d=google.com; s=arc-20160816; b=ihOCbTqatti37mD/cmNaSlmx3hMIbhXltpQiSP9gY6JUEyqs3hdcew0wB1z7xLVqPj J629fh6VWQXkKiEKkTAmVfdFGTuRpVG/CP4QJasIgCITm1sFf55scGfVnd7eXeBUwvZg o3G4DQYwprh/paHeR96CWYy4Od68ZU9k20EuSs7TqH1Q91LNhG4Gwki4zXHTaK3ZoNrY ofJ0ytRRYMvdSpS4Jhei/+h8j9iQSlEHHWYZ6NfXPSey8j8SfxXDYJhDsH84K9L287rT C0CgrME66aedHfe4Adh9j9ttFj/DdWnaqCSuPiwkJ/ssHtm5kO7VQj4Xi26cyiJJLr/+ oAFw== 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 :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=Xqaz7PG2hgPzDVRZqNI4JrgUkMW9CncVSItiep3wWM4=; b=EZRRoerKyHLxJM4pzpEdigr3uQnyO4zZMhRFuByvyS4sxfNUM9wWHVhcjyBm02u7m2 yRtQHSKzwyC2QXipHn6PDOrGJtfeJBxhgVQZuPzg7+x4kQkEsg0wwg1vCZDGiVdt/zZp cBMVKA/Q/G8WJn6klVM0TJPxAB/nozd1AScpqII6xcWSATyPERkTZaTFo/h3qQ5jkyBR 6bOhqpjlpLjki8Q0h8GemjryVOLkyW7YM0i+9IXmYMFyPiSQfJ6e3LpwMqjI/GZibzE8 z2/w9WDlt1F39NGVcq7T91djmWzC/8o5GcrqlS5jQvQf1tzFY/XGthPb6yS4IUXW8+C0 Nl0w== 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 p1-v6si38212801plb.290.2018.11.20.09.57.05; Tue, 20 Nov 2018 09:57:19 -0800 (PST) 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 S1729601AbeKUDGm (ORCPT + 99 others); Tue, 20 Nov 2018 22:06:42 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:14690 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726621AbeKUDGm (ORCPT ); Tue, 20 Nov 2018 22:06:42 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 0FB38E8F8F4B0; Wed, 21 Nov 2018 00:36:25 +0800 (CST) Received: from [127.0.0.1] (10.202.226.41) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.408.0; Wed, 21 Nov 2018 00:36:19 +0800 Subject: Re: [PATCH 1/4] scsi: Add scsi_prot_op_normal() To: Christoph Hellwig References: <1542725944-244183-1-git-send-email-john.garry@huawei.com> <1542725944-244183-2-git-send-email-john.garry@huawei.com> <20181120161940.GA10454@infradead.org> CC: , , , , From: John Garry Message-ID: <4493598c-7c25-a1b1-dfbb-aaec0b967185@huawei.com> Date: Tue, 20 Nov 2018 16:36:14 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20181120161940.GA10454@infradead.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.226.41] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/11/2018 16:19, Christoph Hellwig wrote: >> +static inline bool scsi_prot_op_normal(struct scsi_cmnd *scmd) >> +{ >> + return scmd->prot_op == SCSI_PROT_NORMAL; >> +} > > This "wrapper" just obsfucates the check being performed, please drop > it. > > . > ok, if you think so. I just thought that was better for a more concise check, rather than this common pattern: if ((scsi_get_prot_op(scsi_cmnd) != SCSI_PROT_NORMAL) ... cheers,