Blackfin: fix warnings with I/O port macros
The I/O port functions take ints, so we need to cast them up before passing to our read/write funcs to avoid ugly messes of warnings. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
This commit is contained in:
parent
f4290e81f6
commit
f75196c404
1 changed files with 15 additions and 12 deletions
|
@ -80,19 +80,22 @@ static inline unsigned int readl(const volatile void __iomem *addr)
|
|||
#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c))
|
||||
#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c))
|
||||
|
||||
#define inb(addr) readb(addr)
|
||||
#define inw(addr) readw(addr)
|
||||
#define inl(addr) readl(addr)
|
||||
#define outb(x,addr) ((void) writeb(x,addr))
|
||||
#define outw(x,addr) ((void) writew(x,addr))
|
||||
#define outl(x,addr) ((void) writel(x,addr))
|
||||
/* Convert "I/O port addresses" to actual addresses. i.e. ugly casts. */
|
||||
#define __io(port) ((void *)(unsigned long)(port))
|
||||
|
||||
#define inb_p(addr) inb(addr)
|
||||
#define inw_p(addr) inw(addr)
|
||||
#define inl_p(addr) inl(addr)
|
||||
#define outb_p(x,addr) outb(x,addr)
|
||||
#define outw_p(x,addr) outw(x,addr)
|
||||
#define outl_p(x,addr) outl(x,addr)
|
||||
#define inb(port) readb(__io(port))
|
||||
#define inw(port) readw(__io(port))
|
||||
#define inl(port) readl(__io(port))
|
||||
#define outb(x,port) writeb(x,__io(port))
|
||||
#define outw(x,port) writew(x,__io(port))
|
||||
#define outl(x,port) writel(x,__io(port))
|
||||
|
||||
#define inb_p(port) inb(__io(port))
|
||||
#define inw_p(port) inw(__io(port))
|
||||
#define inl_p(port) inl(__io(port))
|
||||
#define outb_p(x,port) outb(x,__io(port))
|
||||
#define outw_p(x,port) outw(x,__io(port))
|
||||
#define outl_p(x,port) outl(x,__io(port))
|
||||
|
||||
#define ioread8_rep(a,d,c) readsb(a,d,c)
|
||||
#define ioread16_rep(a,d,c) readsw(a,d,c)
|
||||
|
|
Loading…
Reference in a new issue