diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-09-24 05:42:06 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-09-24 05:42:06 -0400 |
commit | d2f607484f8210cf19b1730dee26d426a5a770a5 (patch) | |
tree | b05e0376b0843063e14342811dbedc8bf2f4177b | |
parent | 87e807b6c461bbd449496a4c3ab78ab164a4ba97 (diff) |
[ARM] Fix compiler warnings for memcpy_toio/memcpy_fromio/memset_io
Add 'volatile' to the __iomem pointers for these functions as
per x86.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/kernel/io.c | 6 | ||||
-rw-r--r-- | include/asm-arm/io.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/kernel/io.c b/arch/arm/kernel/io.c index 6c20c1188b60..1f6822dfae74 100644 --- a/arch/arm/kernel/io.c +++ b/arch/arm/kernel/io.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copy data from IO memory space to "real" memory space. | 7 | * Copy data from IO memory space to "real" memory space. |
8 | * This needs to be optimized. | 8 | * This needs to be optimized. |
9 | */ | 9 | */ |
10 | void _memcpy_fromio(void *to, void __iomem *from, size_t count) | 10 | void _memcpy_fromio(void *to, const volatile void __iomem *from, size_t count) |
11 | { | 11 | { |
12 | unsigned char *t = to; | 12 | unsigned char *t = to; |
13 | while (count) { | 13 | while (count) { |
@@ -22,7 +22,7 @@ void _memcpy_fromio(void *to, void __iomem *from, size_t count) | |||
22 | * Copy data from "real" memory space to IO memory space. | 22 | * Copy data from "real" memory space to IO memory space. |
23 | * This needs to be optimized. | 23 | * This needs to be optimized. |
24 | */ | 24 | */ |
25 | void _memcpy_toio(void __iomem *to, const void *from, size_t count) | 25 | void _memcpy_toio(volatile void __iomem *to, const void *from, size_t count) |
26 | { | 26 | { |
27 | const unsigned char *f = from; | 27 | const unsigned char *f = from; |
28 | while (count) { | 28 | while (count) { |
@@ -37,7 +37,7 @@ void _memcpy_toio(void __iomem *to, const void *from, size_t count) | |||
37 | * "memset" on IO memory space. | 37 | * "memset" on IO memory space. |
38 | * This needs to be optimized. | 38 | * This needs to be optimized. |
39 | */ | 39 | */ |
40 | void _memset_io(void __iomem *dst, int c, size_t count) | 40 | void _memset_io(volatile void __iomem *dst, int c, size_t count) |
41 | { | 41 | { |
42 | while (count) { | 42 | while (count) { |
43 | count--; | 43 | count--; |
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h index cfa71a0dffb6..5c4ae8f5dbb0 100644 --- a/include/asm-arm/io.h +++ b/include/asm-arm/io.h | |||
@@ -136,9 +136,9 @@ extern void __readwrite_bug(const char *fn); | |||
136 | /* | 136 | /* |
137 | * String version of IO memory access ops: | 137 | * String version of IO memory access ops: |
138 | */ | 138 | */ |
139 | extern void _memcpy_fromio(void *, void __iomem *, size_t); | 139 | extern void _memcpy_fromio(void *, const volatile void __iomem *, size_t); |
140 | extern void _memcpy_toio(void __iomem *, const void *, size_t); | 140 | extern void _memcpy_toio(volatile void __iomem *, const void *, size_t); |
141 | extern void _memset_io(void __iomem *, int, size_t); | 141 | extern void _memset_io(volatile void __iomem *, int, size_t); |
142 | 142 | ||
143 | #define mmiowb() | 143 | #define mmiowb() |
144 | 144 | ||