lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ