summaryrefslogtreecommitdiff
path: root/drivers/ata/pata_via.c
diff options
context:
space:
mode:
authorSergey Shtylyov <s.shtylyov@omp.ru>2022-06-14 22:51:47 +0300
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>2022-06-17 10:35:02 +0300
commitf0a6d77b351c18c122fc1638ac9e58f5e0346f64 (patch)
tree1e232bf4b52162f14bd05ab62b6c2651d03ce4bc /drivers/ata/pata_via.c
parent5eb8deb4af56b120c152066ff43a0867267b264b (diff)
downloadlinux-f0a6d77b351c18c122fc1638ac9e58f5e0346f64.tar.xz
ata: make transfer mode masks *unsigned int*
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@omp.ru> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Diffstat (limited to 'drivers/ata/pata_via.c')
-rw-r--r--drivers/ata/pata_via.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index 215c02d4056a..34f00f389932 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -352,7 +352,7 @@ static void via_set_dmamode(struct ata_port *ap, struct ata_device *adev)
* one breed of Transcend SSD. Return the updated mask.
*/
-static unsigned long via_mode_filter(struct ata_device *dev, unsigned long mask)
+static unsigned int via_mode_filter(struct ata_device *dev, unsigned int mask)
{
struct ata_host *host = dev->link->ap->host;
const struct via_isa_bridge *config = host->private_data;