Skip to content

Commit

Permalink
[ARM] Fix compiler warnings for memcpy_toio/memcpy_fromio/memset_io
Browse files Browse the repository at this point in the history
Add 'volatile' to the __iomem pointers for these functions as
per x86.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King authored and Russell King committed Sep 24, 2005
1 parent 87e807b commit d2f6074
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions arch/arm/kernel/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Copy data from IO memory space to "real" memory space.
* This needs to be optimized.
*/
void _memcpy_fromio(void *to, void __iomem *from, size_t count)
void _memcpy_fromio(void *to, const volatile void __iomem *from, size_t count)
{
unsigned char *t = to;
while (count) {
Expand All @@ -22,7 +22,7 @@ void _memcpy_fromio(void *to, void __iomem *from, size_t count)
* Copy data from "real" memory space to IO memory space.
* This needs to be optimized.
*/
void _memcpy_toio(void __iomem *to, const void *from, size_t count)
void _memcpy_toio(volatile void __iomem *to, const void *from, size_t count)
{
const unsigned char *f = from;
while (count) {
Expand All @@ -37,7 +37,7 @@ void _memcpy_toio(void __iomem *to, const void *from, size_t count)
* "memset" on IO memory space.
* This needs to be optimized.
*/
void _memset_io(void __iomem *dst, int c, size_t count)
void _memset_io(volatile void __iomem *dst, int c, size_t count)
{
while (count) {
count--;
Expand Down
6 changes: 3 additions & 3 deletions include/asm-arm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ extern void __readwrite_bug(const char *fn);
/*
* String version of IO memory access ops:
*/
extern void _memcpy_fromio(void *, void __iomem *, size_t);
extern void _memcpy_toio(void __iomem *, const void *, size_t);
extern void _memset_io(void __iomem *, int, size_t);
extern void _memcpy_fromio(void *, const volatile void __iomem *, size_t);
extern void _memcpy_toio(volatile void __iomem *, const void *, size_t);
extern void _memset_io(volatile void __iomem *, int, size_t);

#define mmiowb()

Expand Down

0 comments on commit d2f6074

Please sign in to comment.