• Sergey Shtylyov's avatar
    ata: make transfer mode masks *unsigned int* · f0a6d77b
    Sergey Shtylyov authored
    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: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
    Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
    f0a6d77b
pata_amd.c 17 KB