Re: [PATCH] ata: make transfer mode masks *unsigned int*

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

 



On 6/15/22 04:51, Sergey Shtylyov wrote:
> The packed transfer mode masks and also the {pio|mwdma|udma}_mask fields
> of *struct*s ata_device and ata_port_info are declared as *unsigned long*
> (which is a 64-bit type on 64-bit architectures) but actually the packed
> masks occupy only 20 bits (7 PIO modes, 5 MWDMA modes, and 8 UDMA modes)
> and the PIO/MWDMA/UDMA masks easily fit into just 8 bits each, so we can
> safely use (always 32-bit) *unsigned int* variables instead.  This saves
> 745 bytes of object code in libata-core.o alone, not to mention LLDDs...
> 
> Signed-off-by: Sergey Shtylyov <s.shtylyov@xxxxxx>

Applied to for-5.20. Thanks !

-- 
Damien Le Moal
Western Digital Research



[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