Re: [PATCH 2/3] ata: Enabling ATA Command Priorities

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

 



The 09/29/2016 10:45, Tejun Heo wrote:
> Hello,
> 
> On Tue, Sep 27, 2016 at 11:14:55AM -0700, Adam Manzanares wrote:
> > +/**
> > + *	ata_ncq_prio_enabled - Test whether NCQ prio is enabled
> > + *	@dev: ATA device to test for
> > + *
> > + *	LOCKING:
> > + *	spin_lock_irqsave(host lock)
> > + *
> > + *	RETURNS:
> > + *	1 if NCQ prio is enabled for @dev, 0 otherwise.
> > + */
> > +static inline int ata_ncq_prio_enabled(struct ata_device *dev)
> > +{
> > +	return (dev->flags & (ATA_DFLAG_PIO | ATA_DFLAG_NCQ_OFF |
> > +			      ATA_DFLAG_NCQ_PRIO)) == ATA_DFLAG_NCQ_PRIO;
> 
> I'm not sure this needs to test PIO and NCQ_OFF.  This functions
> pretty much can assume that it'd be only called in NCQ context, no?
>

This should only be called in the NCQ context so these checks are redundant
I'll clean this up in the next version of the patches.

> Thanks.
> 
> -- 
> tejun

Take care,
Adam
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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