Commit 1aeb3c5c authored by Arnd Bergmann's avatar Arnd Bergmann

ARM: ixp4xx: fix {in,out}s{bwl} data types

Most platforms use void pointer arguments in these functions, but
ixp4xx does not, which triggers lots of warnings in device drivers like:

net/ethernet/8390/ne2k-pci.c: In function 'ne2k_pci_get_8390_hdr':
net/ethernet/8390/ne2k-pci.c:503:3: warning: passing argument 2 of 'insw' from incompatible pointer type
   insw(NE_BASE + NE_DATAPORT, hdr, sizeof(struct e8390_pkt_hdr)>>1);
   ^
In file included from include/asm/io.h:214:0,
                 from /git/arm-soc/include/linux/io.h:22,
                 from /git/arm-soc/include/linux/pci.h:31,
                 from net/ethernet/8390/ne2k-pci.c:48:
mach-ixp4xx/include/mach/io.h:316:91: note: expected 'u16 *' but argument is of type 'struct e8390_pkt_hdr *'
 static inline void insw(u32 io_addr, u16 *vaddr, u32 count)

Fixing the drivers seems hopeless, so this changes the ixp4xx code
to do the same as the others to avoid the warnings.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarKrzysztof Halasa <khalasa@piap.pl>
Cc: Imre Kaloz <kaloz@openwrt.org>
parent d76f733d
...@@ -245,8 +245,10 @@ static inline void outb(u8 value, u32 addr) ...@@ -245,8 +245,10 @@ static inline void outb(u8 value, u32 addr)
} }
#define outsb outsb #define outsb outsb
static inline void outsb(u32 io_addr, const u8 *vaddr, u32 count) static inline void outsb(u32 io_addr, const void *p, u32 count)
{ {
const u8 *vaddr = p;
while (count--) while (count--)
outb(*vaddr++, io_addr); outb(*vaddr++, io_addr);
} }
...@@ -262,8 +264,9 @@ static inline void outw(u16 value, u32 addr) ...@@ -262,8 +264,9 @@ static inline void outw(u16 value, u32 addr)
} }
#define outsw outsw #define outsw outsw
static inline void outsw(u32 io_addr, const u16 *vaddr, u32 count) static inline void outsw(u32 io_addr, const void *p, u32 count)
{ {
const u16 *vaddr = p;
while (count--) while (count--)
outw(cpu_to_le16(*vaddr++), io_addr); outw(cpu_to_le16(*vaddr++), io_addr);
} }
...@@ -275,8 +278,9 @@ static inline void outl(u32 value, u32 addr) ...@@ -275,8 +278,9 @@ static inline void outl(u32 value, u32 addr)
} }
#define outsl outsl #define outsl outsl
static inline void outsl(u32 io_addr, const u32 *vaddr, u32 count) static inline void outsl(u32 io_addr, const void *p, u32 count)
{ {
const u32 *vaddr = p;
while (count--) while (count--)
outl(cpu_to_le32(*vaddr++), io_addr); outl(cpu_to_le32(*vaddr++), io_addr);
} }
...@@ -294,8 +298,9 @@ static inline u8 inb(u32 addr) ...@@ -294,8 +298,9 @@ static inline u8 inb(u32 addr)
} }
#define insb insb #define insb insb
static inline void insb(u32 io_addr, u8 *vaddr, u32 count) static inline void insb(u32 io_addr, void *p, u32 count)
{ {
u8 *vaddr = p;
while (count--) while (count--)
*vaddr++ = inb(io_addr); *vaddr++ = inb(io_addr);
} }
...@@ -313,8 +318,9 @@ static inline u16 inw(u32 addr) ...@@ -313,8 +318,9 @@ static inline u16 inw(u32 addr)
} }
#define insw insw #define insw insw
static inline void insw(u32 io_addr, u16 *vaddr, u32 count) static inline void insw(u32 io_addr, void *p, u32 count)
{ {
u16 *vaddr = p;
while (count--) while (count--)
*vaddr++ = le16_to_cpu(inw(io_addr)); *vaddr++ = le16_to_cpu(inw(io_addr));
} }
...@@ -330,8 +336,9 @@ static inline u32 inl(u32 addr) ...@@ -330,8 +336,9 @@ static inline u32 inl(u32 addr)
} }
#define insl insl #define insl insl
static inline void insl(u32 io_addr, u32 *vaddr, u32 count) static inline void insl(u32 io_addr, void *p, u32 count)
{ {
u32 *vaddr = p;
while (count--) while (count--)
*vaddr++ = le32_to_cpu(inl(io_addr)); *vaddr++ = le32_to_cpu(inl(io_addr));
} }
......
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