Re: [PATCH] libata: fix ata_id_logical_per_physical_sectors

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

 



On Thu, Jan 28, 2010 at 01:56:21PM +0300, Sergei Shtylyov wrote:
> > static inline u8 ata_id_logical_per_physical_sectors(const u16 *id)
> > {
> >-	return id[ATA_ID_SECTOR_SIZE] & 0xf;
> >+	return 1 << (id[ATA_ID_SECTOR_SIZE] & 0xf);
> >  
> 
>   Will this still fit into u8?

Right now the only value we get in practice is 8 for 4k sector drivers
which still fits fine into an u8.  But it might indeed be safer to use a
large value.

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