[PATCH 3/3] ata: make ata_port_info::{pio|mwdma|udma}_mask *unsigned int*

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

 



The {pio|mwdma|udma}_mask fields of the *struct* ata_port_info are declared
as *unsigned long* (which is a 64-bit type on 64-bit architectures) while
the actual masks should easily fit into just 8 bits. The alike fields in
the *struct* ata_port are declared as *unsigned int*, so there are silent
truncations going on in ata_host_alloc_pinfo() anyway... Using *unsigned*
*int* fields instead saves some object code in many LLDDs too...

Signed-off-by: Sergey Shtylyov <s.shtylyov@xxxxxx>
---
 include/linux/libata.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/libata.h b/include/linux/libata.h
index f6fc482d767a..6417f1fd4852 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -979,9 +979,9 @@ struct ata_port_operations {
 struct ata_port_info {
 	unsigned long		flags;
 	unsigned long		link_flags;
-	unsigned long		pio_mask;
-	unsigned long		mwdma_mask;
-	unsigned long		udma_mask;
+	unsigned int		pio_mask;
+	unsigned int		mwdma_mask;
+	unsigned int		udma_mask;
 	struct ata_port_operations *port_ops;
 	void 			*private_data;
 };
-- 
2.26.3




[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