Commit b727c73c authored by Russell King's avatar Russell King

[ARM] Eliminate io.c sparse warnings/ gcc 3.4 errors.

arch/arm/kernel/io.c:15:5: warning: generating address of non-lvalue
arch/arm/kernel/io.c:15:5: warning: loading unknown expression
arch/arm/kernel/io.c:29:5: warning: generating address of non-lvalue
arch/arm/kernel/io.c:29:5: warning: loading unknown expression
parent 749fb94b
...@@ -7,12 +7,13 @@ ...@@ -7,12 +7,13 @@
* Copy data from IO memory space to "real" memory space. * Copy data from IO memory space to "real" memory space.
* This needs to be optimized. * This needs to be optimized.
*/ */
void _memcpy_fromio(void * to, unsigned long from, size_t count) void _memcpy_fromio(void *to, unsigned long from, size_t count)
{ {
unsigned char *t = to;
while (count) { while (count) {
count--; count--;
*(char *) to = readb(from); *t = readb(from);
((char *) to)++; t++;
from++; from++;
} }
} }
...@@ -21,12 +22,13 @@ void _memcpy_fromio(void * to, unsigned long from, size_t count) ...@@ -21,12 +22,13 @@ void _memcpy_fromio(void * to, unsigned long from, size_t count)
* Copy data from "real" memory space to IO memory space. * Copy data from "real" memory space to IO memory space.
* This needs to be optimized. * This needs to be optimized.
*/ */
void _memcpy_toio(unsigned long to, const void * from, size_t count) void _memcpy_toio(unsigned long to, const void *from, size_t count)
{ {
const unsigned char *f = from;
while (count) { while (count) {
count--; count--;
writeb(*(char *) from, to); writeb(*f, to);
((char *) from)++; f++;
to++; to++;
} }
} }
......
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