Commit 2e0b3d0e authored by Ben Dooks's avatar Ben Dooks Committed by Russell King

[ARM PATCH] 2438/1: S3C2410 - fix IO address calculations

Patch from Ben Dooks

Patch from Dimitry Andric.
The include/asm-arm/arch-s3c2410/io.h file converts
PC style port addresses to real ARM addresses, and
needs to return an `void __iomem *` to avoid a number
of warnings:
  CC      drivers/ide/ide-iops.o
drivers/ide/ide-iops.c: In function `ide_insw':
drivers/ide/ide-iops.c:49: warning: passing arg 1 of `__raw_readsw' makes pointer from integer without a cast
drivers/ide/ide-iops.c: In function `ide_insl':
drivers/ide/ide-iops.c:59: warning: passing arg 1 of `__raw_readsl' makes pointer from integer without a cast
drivers/ide/ide-iops.c: In function `ide_outsw':
drivers/ide/ide-iops.c:79: warning: passing arg 1 of `__raw_writesw' makes pointer from integer without a cast
drivers/ide/ide-iops.c: In function `ide_outsl':
drivers/ide/ide-iops.c:89: warning: passing arg 1 of `__raw_writesl' makes pointer from integer without a cast
  CC      lib/iomap.o
lib/iomap.c: In function `ioread8_rep':
lib/iomap.c:140: warning: passing arg 1 of `__raw_readsb' makes pointer from integer without a cast
lib/iomap.c: In function `ioread16_rep':
lib/iomap.c:144: warning: passing arg 1 of `__raw_readsw' makes pointer from integer without a cast
lib/iomap.c: In function `ioread32_rep':
lib/iomap.c:148: warning: passing arg 1 of `__raw_readsl' makes pointer from integer without a cast
lib/iomap.c: In function `iowrite8_rep':
lib/iomap.c:156: warning: passing arg 1 of `__raw_writesb' makes pointer from integer without a cast
lib/iomap.c: In function `iowrite16_rep':
lib/iomap.c:160: warning: passing arg 1 of `__raw_writesw' makes pointer from integer without a cast
lib/iomap.c: In function `iowrite32_rep':
lib/iomap.c:164: warning: passing arg 1 of `__raw_writesl' makes pointer from integer without a cast

Signed-off-by: Dimitry Andric

Signed-off-by: Ben Dooks
Signed-off-by: Russell King
parent c3dfb72c
......@@ -65,12 +65,9 @@ static inline unsigned sz __in##fnsuffix (unsigned int port) \
return (unsigned sz)value; \
}
static inline unsigned int __ioaddr (unsigned int port)
static inline void __iomem *__ioaddr (unsigned int port)
{
if (__PORT_PCIO(port))
return (unsigned int)(PCIO_BASE + (port));
else
return (unsigned int)(0 + (port));
return (void __iomem *)(__PORT_PCIO(port) ? PCIO_BASE + port : port);
}
#define DECLARE_IO(sz,fnsuffix,instr) \
......@@ -170,7 +167,7 @@ DECLARE_IO(int,l,"")
result; \
})
#define __ioaddrc(port) (__PORT_PCIO((port)) ? PCIO_BASE + ((port)) : ((port)))
#define __ioaddrc(port) ((void __iomem *)(__PORT_PCIO(port) ? PCIO_BASE + (port) : (port)))
#define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p))
#define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment