Commit 3756513d authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] m68k: lvalues abuse in dmasound

Cast is not an lvalue
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 815f597b
...@@ -217,8 +217,9 @@ static ssize_t ata_ct_u8(const u_char *userPtr, size_t userCount, ...@@ -217,8 +217,9 @@ static ssize_t ata_ct_u8(const u_char *userPtr, size_t userCount,
used = count*2; used = count*2;
while (count > 0) { while (count > 0) {
u_short data; u_short data;
if (get_user(data, ((u_short *)userPtr)++)) if (get_user(data, (u_short *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2;
*p++ = data ^ 0x8080; *p++ = data ^ 0x8080;
count--; count--;
} }
...@@ -240,8 +241,9 @@ static ssize_t ata_ct_s16be(const u_char *userPtr, size_t userCount, ...@@ -240,8 +241,9 @@ static ssize_t ata_ct_s16be(const u_char *userPtr, size_t userCount,
used = count*2; used = count*2;
while (count > 0) { while (count > 0) {
u_short data; u_short data;
if (get_user(data, ((u_short *)userPtr)++)) if (get_user(data, (u_short *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2;
*p++ = data; *p++ = data;
*p++ = data; *p++ = data;
count--; count--;
...@@ -271,8 +273,9 @@ static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount, ...@@ -271,8 +273,9 @@ static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount,
used = count*2; used = count*2;
while (count > 0) { while (count > 0) {
u_short data; u_short data;
if (get_user(data, ((u_short *)userPtr)++)) if (get_user(data, (u_short *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2;
data ^= 0x8000; data ^= 0x8000;
*p++ = data; *p++ = data;
*p++ = data; *p++ = data;
...@@ -285,8 +288,9 @@ static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount, ...@@ -285,8 +288,9 @@ static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount,
used = count*4; used = count*4;
while (count > 0) { while (count > 0) {
u_long data; u_long data;
if (get_user(data, ((u_int *)userPtr)++)) if (get_user(data, (u_int *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 4;
*p++ = data ^ 0x80008000; *p++ = data ^ 0x80008000;
count--; count--;
} }
...@@ -309,8 +313,9 @@ static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount, ...@@ -309,8 +313,9 @@ static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount,
used = count*2; used = count*2;
while (count > 0) { while (count > 0) {
u_short data; u_short data;
if (get_user(data, ((u_short *)userPtr)++)) if (get_user(data, (u_short *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2;
data = le2be16(data); data = le2be16(data);
*p++ = data; *p++ = data;
*p++ = data; *p++ = data;
...@@ -323,8 +328,9 @@ static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount, ...@@ -323,8 +328,9 @@ static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount,
used = count*4; used = count*4;
while (count > 0) { while (count > 0) {
u_long data; u_long data;
if (get_user(data, ((u_int *)userPtr)++)) if (get_user(data, (u_int *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 4;
data = le2be16dbl(data); data = le2be16dbl(data);
*p++ = data; *p++ = data;
count--; count--;
...@@ -348,8 +354,9 @@ static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount, ...@@ -348,8 +354,9 @@ static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount,
used = count*2; used = count*2;
while (count > 0) { while (count > 0) {
u_short data; u_short data;
if (get_user(data, ((u_short *)userPtr)++)) if (get_user(data, (u_short *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2;
data = le2be16(data) ^ 0x8000; data = le2be16(data) ^ 0x8000;
*p++ = data; *p++ = data;
*p++ = data; *p++ = data;
...@@ -361,8 +368,9 @@ static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount, ...@@ -361,8 +368,9 @@ static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount,
used = count; used = count;
while (count > 0) { while (count > 0) {
u_long data; u_long data;
if (get_user(data, ((u_int *)userPtr)++)) if (get_user(data, (u_int *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 4;
data = le2be16dbl(data) ^ 0x80008000; data = le2be16dbl(data) ^ 0x80008000;
*p++ = data; *p++ = data;
count--; count--;
...@@ -470,8 +478,9 @@ static ssize_t ata_ctx_s8(const u_char *userPtr, size_t userCount, ...@@ -470,8 +478,9 @@ static ssize_t ata_ctx_s8(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 2) if (userCount < 2)
break; break;
if (get_user(data, ((u_short *)userPtr)++)) if (get_user(data, (u_short *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2;
userCount -= 2; userCount -= 2;
bal += hSpeed; bal += hSpeed;
} }
...@@ -524,8 +533,9 @@ static ssize_t ata_ctx_u8(const u_char *userPtr, size_t userCount, ...@@ -524,8 +533,9 @@ static ssize_t ata_ctx_u8(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 2) if (userCount < 2)
break; break;
if (get_user(data, ((u_short *)userPtr)++)) if (get_user(data, (u_short *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2;
data ^= 0x8080; data ^= 0x8080;
userCount -= 2; userCount -= 2;
bal += hSpeed; bal += hSpeed;
...@@ -561,8 +571,9 @@ static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount, ...@@ -561,8 +571,9 @@ static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 2) if (userCount < 2)
break; break;
if (get_user(data, ((u_short *)userPtr)++)) if (get_user(data, (u_short *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2;
userCount -= 2; userCount -= 2;
bal += hSpeed; bal += hSpeed;
} }
...@@ -579,8 +590,9 @@ static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount, ...@@ -579,8 +590,9 @@ static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 4) if (userCount < 4)
break; break;
if (get_user(data, ((u_int *)userPtr)++)) if (get_user(data, (u_int *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 4;
userCount -= 4; userCount -= 4;
bal += hSpeed; bal += hSpeed;
} }
...@@ -615,8 +627,9 @@ static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount, ...@@ -615,8 +627,9 @@ static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 2) if (userCount < 2)
break; break;
if (get_user(data, ((u_short *)userPtr)++)) if (get_user(data, (u_short *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2;
data ^= 0x8000; data ^= 0x8000;
userCount -= 2; userCount -= 2;
bal += hSpeed; bal += hSpeed;
...@@ -634,8 +647,9 @@ static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount, ...@@ -634,8 +647,9 @@ static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 4) if (userCount < 4)
break; break;
if (get_user(data, ((u_int *)userPtr)++)) if (get_user(data, (u_int *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 4;
data ^= 0x80008000; data ^= 0x80008000;
userCount -= 4; userCount -= 4;
bal += hSpeed; bal += hSpeed;
...@@ -671,8 +685,9 @@ static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount, ...@@ -671,8 +685,9 @@ static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 2) if (userCount < 2)
break; break;
if (get_user(data, ((u_short *)userPtr)++)) if (get_user(data, (u_short *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2;
data = le2be16(data); data = le2be16(data);
userCount -= 2; userCount -= 2;
bal += hSpeed; bal += hSpeed;
...@@ -690,8 +705,9 @@ static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount, ...@@ -690,8 +705,9 @@ static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 4) if (userCount < 4)
break; break;
if (get_user(data, ((u_int *)userPtr)++)) if (get_user(data, (u_int *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 4;
data = le2be16dbl(data); data = le2be16dbl(data);
userCount -= 4; userCount -= 4;
bal += hSpeed; bal += hSpeed;
...@@ -727,8 +743,9 @@ static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount, ...@@ -727,8 +743,9 @@ static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 2) if (userCount < 2)
break; break;
if (get_user(data, ((u_short *)userPtr)++)) if (get_user(data, (u_short *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2;
data = le2be16(data) ^ 0x8000; data = le2be16(data) ^ 0x8000;
userCount -= 2; userCount -= 2;
bal += hSpeed; bal += hSpeed;
...@@ -746,8 +763,9 @@ static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount, ...@@ -746,8 +763,9 @@ static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 4) if (userCount < 4)
break; break;
if (get_user(data, ((u_int *)userPtr)++)) if (get_user(data, (u_int *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 4;
data = le2be16dbl(data) ^ 0x80008000; data = le2be16dbl(data) ^ 0x80008000;
userCount -= 4; userCount -= 4;
bal += hSpeed; bal += hSpeed;
......
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