pcmcia mem_op.h gcc-3.4 fixes
PATCH 1/1 pcmcia mem_op.h gcc-3.4 fixes
This patch fixes gcc-3.4 cast-as-lvalue warnings in the 2.4.28-pre3 kernel caused by include/pcmcia/mem_op.h. The changes are all backports from the 2.6 kernel.
/Mikael
include/pcmcia/mem_op.h renamed from include/pcmcia/mem_op.h.~1~ +12 -4
@@ -81,7 +81,9 @@ n -= odd;while (n) { *(u_short *)to =__raw_readw (from); - (char *)to +=2 ; (char *)from +=2 ; n -=2 ; + to = (void *)((long )to +2 ); + from = (const void *)((long )from +2 ); + n -=2 ; }if (odd) *(u_char *)to =readb (from);
@@ -93,7 +95,9 @@ n -= odd;while (n) {__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)writeb (*(u_char *)from, to);
@@ -105,7 +109,9 @@ n -= odd;while (n) {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)put_user (readb (from), (char *)to);
@@ -120,7 +126,9 @@while (n) {get_user (s, (short *)from);__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) {get_user (c, (char *)from);