Re: [PATCH 11/28] ata: add CONFIG_SATA_HOST=n version of ata_ncq_enabled()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  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;



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux