diff options
author | Greg Ungerer <gerg@uclinux.org> | 2014-01-20 02:41:52 -0500 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2014-03-10 19:38:22 -0400 |
commit | 4dc5aa2172373fe7ccc25bc22fc21fcf150a66c5 (patch) | |
tree | 56528d14af1a373ba7b1c375c45a3f4dd0e00b4c | |
parent | b6a8ebb59867d51b7cd60c81ffa497ac8ff682a9 (diff) |
m68knommu: fix arg types for outs* functions
Compiling for any m68knommu targets will give the following warnings:
CC lib/iomap_copy.o
lib/iomap.c: In function ‘iowrite8_rep’:
lib/iomap.c:213:2: warning: passing argument 2 of ‘io_outsb’ discards qualifiers from pointer target type
arch/m68k/include/asm/io_no.h:58:20: note: expected ‘void *’ but argument is of type ‘const void *’
lib/iomap.c: In function ‘iowrite16_rep’:
lib/iomap.c:217:2: warning: passing argument 2 of ‘io_outsw’ discards qualifiers from pointer target type
arch/m68k/include/asm/io_no.h:66:20: note: expected ‘void *’ but argument is of type ‘const void *’
lib/iomap.c: In function ‘iowrite32_rep’:
lib/iomap.c:221:2: warning: passing argument 2 of ‘io_outsl’ discards qualifiers from pointer target type
arch/m68k/include/asm/io_no.h:74:20: note: expected ‘void *’ but argument is of type ‘const void *’
Fix it by puting in the appropriate const qualifier on the buf argument of
the m68knommu outs* inline functions.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
-rw-r--r-- | arch/m68k/include/asm/io_no.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/m68k/include/asm/io_no.h b/arch/m68k/include/asm/io_no.h index e1534783e94e..52f7e8499172 100644 --- a/arch/m68k/include/asm/io_no.h +++ b/arch/m68k/include/asm/io_no.h | |||
@@ -55,7 +55,7 @@ static inline unsigned int _swapl(volatile unsigned long v) | |||
55 | #define __raw_writew writew | 55 | #define __raw_writew writew |
56 | #define __raw_writel writel | 56 | #define __raw_writel writel |
57 | 57 | ||
58 | static inline void io_outsb(unsigned int addr, void *buf, int len) | 58 | static inline void io_outsb(unsigned int addr, const void *buf, int len) |
59 | { | 59 | { |
60 | volatile unsigned char *ap = (volatile unsigned char *) addr; | 60 | volatile unsigned char *ap = (volatile unsigned char *) addr; |
61 | unsigned char *bp = (unsigned char *) buf; | 61 | unsigned char *bp = (unsigned char *) buf; |
@@ -63,7 +63,7 @@ static inline void io_outsb(unsigned int addr, void *buf, int len) | |||
63 | *ap = *bp++; | 63 | *ap = *bp++; |
64 | } | 64 | } |
65 | 65 | ||
66 | static inline void io_outsw(unsigned int addr, void *buf, int len) | 66 | static inline void io_outsw(unsigned int addr, const void *buf, int len) |
67 | { | 67 | { |
68 | volatile unsigned short *ap = (volatile unsigned short *) addr; | 68 | volatile unsigned short *ap = (volatile unsigned short *) addr; |
69 | unsigned short *bp = (unsigned short *) buf; | 69 | unsigned short *bp = (unsigned short *) buf; |
@@ -71,7 +71,7 @@ static inline void io_outsw(unsigned int addr, void *buf, int len) | |||
71 | *ap = _swapw(*bp++); | 71 | *ap = _swapw(*bp++); |
72 | } | 72 | } |
73 | 73 | ||
74 | static inline void io_outsl(unsigned int addr, void *buf, int len) | 74 | static inline void io_outsl(unsigned int addr, const void *buf, int len) |
75 | { | 75 | { |
76 | volatile unsigned int *ap = (volatile unsigned int *) addr; | 76 | volatile unsigned int *ap = (volatile unsigned int *) addr; |
77 | unsigned int *bp = (unsigned int *) buf; | 77 | unsigned int *bp = (unsigned int *) buf; |