lkml.org 
[lkml]   [2020]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 11/28] ata: add CONFIG_SATA_HOST=n version of ata_ncq_enabled()
    >  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;

    \
     
     \ /
      Last update: 2020-01-29 18:25    [W:4.122 / U:0.096 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site