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:   Fri, 7 Feb 2020 15:21:28 +0100
From:   Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     Jens Axboe <axboe@...nel.dk>,
        Michael Schmitz <schmitzmic@...il.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 11/28] ata: add CONFIG_SATA_HOST=n version of
 ata_ncq_enabled()


On 1/29/20 6:24 PM, Christoph Hellwig wrote:
>>  static inline int ata_ncq_enabled(struct ata_device *dev)
>>  {
>> +#ifdef CONFIG_SATA_HOST
>>  	return (dev->flags & (ATA_DFLAG_PIO | ATA_DFLAG_NCQ_OFF |
>>  			      ATA_DFLAG_NCQ)) == ATA_DFLAG_NCQ;
>> +#else
>> +	return 0;
>> +#endif
> 
> I think this is a prime candidate for IS_ENABLED:
> 
> 	if (!IS_ENABLED(CONFIG_SATA_HOST))
> 		return 0;
>  	return (dev->flags & (ATA_DFLAG_PIO | ATA_DFLAG_NCQ_OFF |
>   			      ATA_DFLAG_NCQ)) == ATA_DFLAG_NCQ;
> 

Fully agreed, fixed in v2.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ