[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4493598c-7c25-a1b1-dfbb-aaec0b967185@huawei.com>
Date: Tue, 20 Nov 2018 16:36:14 +0000
From: John Garry <john.garry@...wei.com>
To: Christoph Hellwig <hch@...radead.org>
CC: <jejb@...ux.vnet.ibm.com>, <martin.petersen@...cle.com>,
<linuxarm@...wei.com>, <linux-kernel@...r.kernel.org>,
<linux-scsi@...r.kernel.org>
Subject: Re: [PATCH 1/4] scsi: Add scsi_prot_op_normal()
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,
Powered by blists - more mailing lists