[PATCH 05/19] ata: ide-sff: fix warnings when compiling as 64-bit

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

 



Driver is applicable to both IDEs with I/O port and MMIO control. This
is differentiated by ide->io.mmio. Compiler can't follow that and
criticizes casting pointers to 32-bit integers on 64-bit architectures.
Adjust the casts to silence this false positive.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 drivers/ata/ide-sff.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/ata/ide-sff.c b/drivers/ata/ide-sff.c
index 69055e058503..f25dfeae4328 100644
--- a/drivers/ata/ide-sff.c
+++ b/drivers/ata/ide-sff.c
@@ -26,7 +26,7 @@ static inline uint8_t ata_rd_byte(struct ide_port *ide, void __iomem *addr)
 	if (ide->io.mmio)
 		return readb(addr);
 	else
-		return (uint8_t) inb((int) addr);
+		return (uint8_t) inb((ulong)addr);
 }
 
 /**
@@ -42,7 +42,7 @@ static inline void ata_wr_byte(struct ide_port *ide, uint8_t value,
 	if (ide->io.mmio)
 		writeb(value, addr);
 	else
-		outb(value, (int) addr);
+		outb(value, (ulong)addr);
 }
 
 /**
@@ -57,7 +57,7 @@ static inline uint16_t ata_rd_word(struct ide_port *ide,
 	if (ide->io.mmio)
 		return readw(addr);
 	else
-		return (uint16_t) inw((int) addr);
+		return (uint16_t) inw((ulong)addr);
 }
 
 /**
@@ -73,7 +73,7 @@ static inline void ata_wr_word(struct ide_port *ide, uint16_t value,
 	if (ide->io.mmio)
 		writew(value, addr);
 	else
-		outw(value, (int) addr);
+		outw(value, (ulong)addr);
 }
 
 /**
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux