aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2015-01-26 07:19:23 -0500
committerArnd Bergmann <arnd@arndb.de>2015-02-18 06:20:27 -0500
commit1aeb3c5c48bebf0bb608c861612c76bdcd0205e6 (patch)
treec81083db50310297b16950c41b600d70a4dffc6f /arch/arm/mach-ixp4xx
parentd76f733ddad6ebc5166675a77824673588797202 (diff)
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: Arnd Bergmann <arnd@arndb.de> Acked-by: Krzysztof Halasa <khalasa@piap.pl> Cc: Imre Kaloz <kaloz@openwrt.org>
Diffstat (limited to 'arch/arm/mach-ixp4xx')
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/io.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h
index 6a722860e34d..b02439019963 100644
--- a/arch/arm/mach-ixp4xx/include/mach/io.h
+++ b/arch/arm/mach-ixp4xx/include/mach/io.h
@@ -245,8 +245,10 @@ static inline void outb(u8 value, u32 addr)
245} 245}
246 246
247#define outsb outsb 247#define outsb outsb
248static inline void outsb(u32 io_addr, const u8 *vaddr, u32 count) 248static inline void outsb(u32 io_addr, const void *p, u32 count)
249{ 249{
250 const u8 *vaddr = p;
251
250 while (count--) 252 while (count--)
251 outb(*vaddr++, io_addr); 253 outb(*vaddr++, io_addr);
252} 254}
@@ -262,8 +264,9 @@ static inline void outw(u16 value, u32 addr)
262} 264}
263 265
264#define outsw outsw 266#define outsw outsw
265static inline void outsw(u32 io_addr, const u16 *vaddr, u32 count) 267static inline void outsw(u32 io_addr, const void *p, u32 count)
266{ 268{
269 const u16 *vaddr = p;
267 while (count--) 270 while (count--)
268 outw(cpu_to_le16(*vaddr++), io_addr); 271 outw(cpu_to_le16(*vaddr++), io_addr);
269} 272}
@@ -275,8 +278,9 @@ static inline void outl(u32 value, u32 addr)
275} 278}
276 279
277#define outsl outsl 280#define outsl outsl
278static inline void outsl(u32 io_addr, const u32 *vaddr, u32 count) 281static inline void outsl(u32 io_addr, const void *p, u32 count)
279{ 282{
283 const u32 *vaddr = p;
280 while (count--) 284 while (count--)
281 outl(cpu_to_le32(*vaddr++), io_addr); 285 outl(cpu_to_le32(*vaddr++), io_addr);
282} 286}
@@ -294,8 +298,9 @@ static inline u8 inb(u32 addr)
294} 298}
295 299
296#define insb insb 300#define insb insb
297static inline void insb(u32 io_addr, u8 *vaddr, u32 count) 301static inline void insb(u32 io_addr, void *p, u32 count)
298{ 302{
303 u8 *vaddr = p;
299 while (count--) 304 while (count--)
300 *vaddr++ = inb(io_addr); 305 *vaddr++ = inb(io_addr);
301} 306}
@@ -313,8 +318,9 @@ static inline u16 inw(u32 addr)
313} 318}
314 319
315#define insw insw 320#define insw insw
316static inline void insw(u32 io_addr, u16 *vaddr, u32 count) 321static inline void insw(u32 io_addr, void *p, u32 count)
317{ 322{
323 u16 *vaddr = p;
318 while (count--) 324 while (count--)
319 *vaddr++ = le16_to_cpu(inw(io_addr)); 325 *vaddr++ = le16_to_cpu(inw(io_addr));
320} 326}
@@ -330,8 +336,9 @@ static inline u32 inl(u32 addr)
330} 336}
331 337
332#define insl insl 338#define insl insl
333static inline void insl(u32 io_addr, u32 *vaddr, u32 count) 339static inline void insl(u32 io_addr, void *p, u32 count)
334{ 340{
341 u32 *vaddr = p;
335 while (count--) 342 while (count--)
336 *vaddr++ = le32_to_cpu(inl(io_addr)); 343 *vaddr++ = le32_to_cpu(inl(io_addr));
337} 344}