From: Al Viro Date: Thu, 12 Jan 2006 09:06:21 +0000 (-0800) Subject: [PATCH] m68k: dmasound_paula.c lvalues abuse (from m68k CVS) X-Git-Tag: v2.6.16-rc1~210 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=815f597be444e5f9f5b4dbd65b862208d5253598;p=linux-2.6 [PATCH] m68k: dmasound_paula.c lvalues abuse (from m68k CVS) Avoid warnings about use of cast expressions as lvalues Signed-off-by: Roman Zippel Signed-off-by: Al Viro Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/sound/oss/dmasound/dmasound_paula.c b/sound/oss/dmasound/dmasound_paula.c index f163868e75..541781507e 100644 --- a/sound/oss/dmasound/dmasound_paula.c +++ b/sound/oss/dmasound/dmasound_paula.c @@ -245,6 +245,7 @@ static ssize_t funcname(const u_char *userPtr, size_t userCount, \ u_char frame[], ssize_t *frameUsed, \ ssize_t frameLeft) \ { \ + const u_short *ptr = (const u_short *)userPtr; \ ssize_t count, used; \ u_short data; \ \ @@ -254,7 +255,7 @@ static ssize_t funcname(const u_char *userPtr, size_t userCount, \ count = min_t(size_t, userCount, frameLeft)>>1 & ~1; \ used = count*2; \ while (count > 0) { \ - if (get_user(data, ((u_short *)userPtr)++)) \ + if (get_user(data, ptr++)) \ return -EFAULT; \ data = convsample(data); \ *high++ = data>>8; \ @@ -269,12 +270,12 @@ static ssize_t funcname(const u_char *userPtr, size_t userCount, \ count = min_t(size_t, userCount, frameLeft)>>2 & ~1; \ used = count*4; \ while (count > 0) { \ - if (get_user(data, ((u_short *)userPtr)++)) \ + if (get_user(data, ptr++)) \ return -EFAULT; \ data = convsample(data); \ *lefth++ = data>>8; \ *leftl++ = (data>>2) & 0x3f; \ - if (get_user(data, ((u_short *)userPtr)++)) \ + if (get_user(data, ptr++)) \ return -EFAULT; \ data = convsample(data); \ *righth++ = data>>8; \