From 82c130f00492e8700cc5479fab7115278f83cd94 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 16 Aug 2006 00:09:08 +0200 Subject: [GCC4] SPARC: fix build error in drivers/fc4/soc.c This patch fixes this error with gcc 4 on sparc : soc.h: In function 'xram_copy_from': soc.h:121: error: invalid lvalue in increment soc.h: In function 'xram_copy_to': soc.h:128: error: invalid lvalue in increment --- drivers/fc4/soc.h | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/fc4/soc.h b/drivers/fc4/soc.h index 740e1a3..0461960 100644 --- a/drivers/fc4/soc.h +++ b/drivers/fc4/soc.h @@ -118,14 +118,16 @@ static inline void xram_copy_from (void val = ((sbus_readw(x + 0x00UL) << 16) | (sbus_readw(x + 0x02UL))); - *((u32 *)p)++ = val; + *(u32 *)p = val; + p += sizeof(u32); } } static inline void xram_copy_to (xram_p x, void *p, int len) { for (len >>= 2; len > 0; len--, x += sizeof(u32)) { - u32 tmp = *((u32 *)p)++; + u32 tmp = *(u32 *)p; + p += sizeof(u32); sbus_writew(tmp >> 16, x + 0x00UL); sbus_writew(tmp, x + 0x02UL); } -- 1.4.2