Re: [PATCH 08/12] libata: implement ata_timing_cycle2mode() and use it in libata-acpi and pata_acpi

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

 



Alan Cox wrote:
>> +	/* PIO */
>> +	mode = ata_timing_cycle2mode(ATA_SHIFT_PIO, gtm->drive[unit].pio);
>> +	xfer_mask |= ata_xfer_mode2mask(mode);
> 
> No check v 0xFF
> 
>> + *	ata_timing_cycle2mode - find xfer mode for the specified cycle duration
>> + *	@xfer_shift: ATA_SHIFT_* value for transfer type to examine.
>> + *	@cycle: cycle duration in ns
>> + *
>> + *	Return matching xfer mode for @cycle.  The returned mode is of
>> + *	the transfer type specified by @xfer_shift.  If @cycle is too
>> + *	slow for @xfer_shift, 0xff is returned.  If @cycle is faster
>> + *	than the fastest known mode, the fasted m
> 
> Can return 0xFF

The check is implicit in ata_xfer_mode2mask(), 0xff translates to
xfermask 0, vice-versa.  0xff is internally a valid value indicating no
mode.

Thanks.

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