Commit db623a6b authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] gcc-3.5: PCMCIA

include/pcmcia/mem_op.h: In function `copy_from_pc':
include/pcmcia/mem_op.h:85: error: invalid lvalue in assignment
include/pcmcia/mem_op.h:85: error: invalid lvalue in assignment
include/pcmcia/mem_op.h: In function `copy_to_pc':
include/pcmcia/mem_op.h:97: error: invalid lvalue in assignment
include/pcmcia/mem_op.h:97: error: invalid lvalue in assignment
include/pcmcia/mem_op.h: In function `copy_pc_to_user':
include/pcmcia/mem_op.h:109: error: invalid lvalue in assignment
include/pcmcia/mem_op.h:109: error: invalid lvalue in assignment
include/pcmcia/mem_op.h: In function `copy_user_to_pc':
include/pcmcia/mem_op.h:124: error: invalid lvalue in assignment
include/pcmcia/mem_op.h:124: error: invalid lvalue in assignment
parent 14bfca03
...@@ -298,7 +298,7 @@ int MTDHelperEntry(int func, void *a1, void *a2) ...@@ -298,7 +298,7 @@ int MTDHelperEntry(int func, void *a1, void *a2)
{ {
window_handle_t w; window_handle_t w;
int ret = pcmcia_request_window(a1, a2, &w); int ret = pcmcia_request_window(a1, a2, &w);
(window_handle_t *)a1 = w; a1 = w;
return ret; return ret;
} }
break; break;
......
...@@ -81,8 +81,12 @@ static inline void copy_from_pc(void *to, const void *from, size_t n) ...@@ -81,8 +81,12 @@ static inline void copy_from_pc(void *to, const void *from, size_t n)
size_t odd = (n & 1); size_t odd = (n & 1);
n -= odd; n -= odd;
while (n) { while (n) {
*(u_short *)to = __raw_readw(from); u_short *t = to;
(char *)to += 2; (char *)from += 2; n -= 2;
*t = __raw_readw(from);
to = (void *)((long)to + 2);
from = (const void *)((long)from + 2);
n -= 2;
} }
if (odd) if (odd)
*(u_char *)to = readb(from); *(u_char *)to = readb(from);
...@@ -94,7 +98,9 @@ static inline void copy_to_pc(void *to, const void *from, size_t n) ...@@ -94,7 +98,9 @@ static inline void copy_to_pc(void *to, const void *from, size_t n)
n -= odd; n -= odd;
while (n) { while (n) {
__raw_writew(*(u_short *)from, to); __raw_writew(*(u_short *)from, to);
(char *)to += 2; (char *)from += 2; n -= 2; to = (void *)((long)to + 2);
from = (const void *)((long)from + 2);
n -= 2;
} }
if (odd) if (odd)
writeb(*(u_char *)from, to); writeb(*(u_char *)from, to);
...@@ -106,7 +112,9 @@ static inline void copy_pc_to_user(void *to, const void *from, size_t n) ...@@ -106,7 +112,9 @@ static inline void copy_pc_to_user(void *to, const void *from, size_t n)
n -= odd; n -= odd;
while (n) { while (n) {
put_user(__raw_readw(from), (short *)to); put_user(__raw_readw(from), (short *)to);
(char *)to += 2; (char *)from += 2; n -= 2; to = (void *)((long)to + 2);
from = (const void *)((long)from + 2);
n -= 2;
} }
if (odd) if (odd)
put_user(readb(from), (char *)to); put_user(readb(from), (char *)to);
...@@ -121,7 +129,9 @@ static inline void copy_user_to_pc(void *to, const void *from, size_t n) ...@@ -121,7 +129,9 @@ static inline void copy_user_to_pc(void *to, const void *from, size_t n)
while (n) { while (n) {
get_user(s, (short *)from); get_user(s, (short *)from);
__raw_writew(s, to); __raw_writew(s, to);
(char *)to += 2; (char *)from += 2; n -= 2; to = (void *)((long)to + 2);
from = (const void *)((long)from + 2);
n -= 2;
} }
if (odd) { if (odd) {
get_user(c, (char *)from); get_user(c, (char *)from);
......
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