Commit 43d16e46 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] casts are not lvalues

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f5a69404
...@@ -809,9 +809,10 @@ static const char * chip_ids[ 16 ] = { ...@@ -809,9 +809,10 @@ static const char * chip_ids[ 16 ] = {
do { \ do { \
char *__ptr = (p); \ char *__ptr = (p); \
int __len = (l); \ int __len = (l); \
if (__len >= 2 && (long)__ptr & 2) { \ if (__len >= 2 && (unsigned long)__ptr & 2) { \
__len -= 2; \ __len -= 2; \
SMC_outw( *((u16 *)__ptr)++, ioaddr, DATA_REG );\ SMC_outw( *(u16 *)__ptr, ioaddr, DATA_REG ); \
__ptr += 2; \
} \ } \
SMC_outsl( ioaddr, DATA_REG, __ptr, __len >> 2); \ SMC_outsl( ioaddr, DATA_REG, __ptr, __len >> 2); \
if (__len & 2) { \ if (__len & 2) { \
...@@ -823,7 +824,7 @@ static const char * chip_ids[ 16 ] = { ...@@ -823,7 +824,7 @@ static const char * chip_ids[ 16 ] = {
do { \ do { \
char *__ptr = (p); \ char *__ptr = (p); \
int __len = (l); \ int __len = (l); \
if ((long)__ptr & 2) { \ if ((unsigned long)__ptr & 2) { \
/* \ /* \
* We want 32bit alignment here. \ * We want 32bit alignment here. \
* Since some buses perform a full 32bit \ * Since some buses perform a full 32bit \
...@@ -831,7 +832,7 @@ static const char * chip_ids[ 16 ] = { ...@@ -831,7 +832,7 @@ static const char * chip_ids[ 16 ] = {
* SMC_inw() here. Back both source (on chip \ * SMC_inw() here. Back both source (on chip \
* and destination) pointers of 2 bytes. \ * and destination) pointers of 2 bytes. \
*/ \ */ \
(long)__ptr &= ~2; \ __ptr -= 2; \
__len += 2; \ __len += 2; \
SMC_SET_PTR( 2|PTR_READ|PTR_RCV|PTR_AUTOINC ); \ SMC_SET_PTR( 2|PTR_READ|PTR_RCV|PTR_AUTOINC ); \
} \ } \
......
...@@ -231,7 +231,8 @@ static void eesoxscsi_buffer_in(void *buf, int length, void *base) ...@@ -231,7 +231,8 @@ static void eesoxscsi_buffer_in(void *buf, int length, void *base)
* Align buffer. * Align buffer.
*/ */
if (((u32)buf) & 2 && status >= 2) { if (((u32)buf) & 2 && status >= 2) {
*((u16 *)buf)++ = readl(reg_dmadata); *(u16 *)buf = readl(reg_dmadata);
buf += 2;
status -= 2; status -= 2;
length -= 2; length -= 2;
} }
...@@ -243,8 +244,10 @@ static void eesoxscsi_buffer_in(void *buf, int length, void *base) ...@@ -243,8 +244,10 @@ static void eesoxscsi_buffer_in(void *buf, int length, void *base)
l1 |= readl(reg_dmadata) << 16; l1 |= readl(reg_dmadata) << 16;
l2 = readl(reg_dmadata) & mask; l2 = readl(reg_dmadata) & mask;
l2 |= readl(reg_dmadata) << 16; l2 |= readl(reg_dmadata) << 16;
*((u32 *)buf)++ = l1; *(u32 *)buf = l1;
*((u32 *)buf)++ = l2; buf += 4;
*(u32 *)buf = l2;
buf += 4;
length -= 8; length -= 8;
continue; continue;
} }
...@@ -255,13 +258,15 @@ static void eesoxscsi_buffer_in(void *buf, int length, void *base) ...@@ -255,13 +258,15 @@ static void eesoxscsi_buffer_in(void *buf, int length, void *base)
l1 = readl(reg_dmadata) & mask; l1 = readl(reg_dmadata) & mask;
l1 |= readl(reg_dmadata) << 16; l1 |= readl(reg_dmadata) << 16;
*((u32 *)buf)++ = l1; *(u32 *)buf = l1;
buf += 4;
length -= 4; length -= 4;
continue; continue;
} }
if (status >= 2) { if (status >= 2) {
*((u16 *)buf)++ = readl(reg_dmadata); *(u16 *)buf = readl(reg_dmadata);
buf += 2;
length -= 2; length -= 2;
} }
} while (length); } while (length);
...@@ -305,7 +310,8 @@ static void eesoxscsi_buffer_out(void *buf, int length, void *base) ...@@ -305,7 +310,8 @@ static void eesoxscsi_buffer_out(void *buf, int length, void *base)
* Align buffer. * Align buffer.
*/ */
if (((u32)buf) & 2 && status >= 2) { if (((u32)buf) & 2 && status >= 2) {
writel(*((u16 *)buf)++ << 16, reg_dmadata); writel(*(u16 *)buf << 16, reg_dmadata);
buf += 2;
status -= 2; status -= 2;
length -= 2; length -= 2;
} }
...@@ -313,8 +319,10 @@ static void eesoxscsi_buffer_out(void *buf, int length, void *base) ...@@ -313,8 +319,10 @@ static void eesoxscsi_buffer_out(void *buf, int length, void *base)
if (status >= 8) { if (status >= 8) {
unsigned long l1, l2; unsigned long l1, l2;
l1 = *((u32 *)buf)++; l1 = *(u32 *)buf;
l2 = *((u32 *)buf)++; buf += 4;
l2 = *(u32 *)buf;
buf += 4;
writel(l1 << 16, reg_dmadata); writel(l1 << 16, reg_dmadata);
writel(l1, reg_dmadata); writel(l1, reg_dmadata);
...@@ -327,7 +335,8 @@ static void eesoxscsi_buffer_out(void *buf, int length, void *base) ...@@ -327,7 +335,8 @@ static void eesoxscsi_buffer_out(void *buf, int length, void *base)
if (status >= 4) { if (status >= 4) {
unsigned long l1; unsigned long l1;
l1 = *((u32 *)buf)++; l1 = *(u32 *)buf;
buf += 4;
writel(l1 << 16, reg_dmadata); writel(l1 << 16, reg_dmadata);
writel(l1, reg_dmadata); writel(l1, reg_dmadata);
...@@ -336,7 +345,8 @@ static void eesoxscsi_buffer_out(void *buf, int length, void *base) ...@@ -336,7 +345,8 @@ static void eesoxscsi_buffer_out(void *buf, int length, void *base)
} }
if (status >= 2) { if (status >= 2) {
writel(*((u16 *)buf)++ << 16, reg_dmadata); writel(*(u16 *)buf << 16, reg_dmadata);
buf += 2;
length -= 2; length -= 2;
} }
} while (length); } while (length);
......
...@@ -769,9 +769,9 @@ do { \ ...@@ -769,9 +769,9 @@ do { \
X##_c = FP_CLS_NORMAL; \ X##_c = FP_CLS_NORMAL; \
\ \
if ((X##_s = (r < 0))) \ if ((X##_s = (r < 0))) \
r = -r; \ ur_ = (unsigned rtype) -r; \
\ else \
ur_ = (unsigned rtype) r; \ ur_ = (unsigned rtype) r; \
if (rsize <= _FP_W_TYPE_SIZE) \ if (rsize <= _FP_W_TYPE_SIZE) \
__FP_CLZ(X##_e, ur_); \ __FP_CLZ(X##_e, ur_); \
else \ else \
......
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