linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 18/36] m68k: dmasound_paula.c lvalues abuse (from m68k CVS)
@ 2005-12-22  4:50 Al Viro
  0 siblings, 0 replies; only message in thread
From: Al Viro @ 2005-12-22  4:50 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel

From: Roman Zippel <zippel@linux-m68k.org>
Date: 1135191147 -0500

avoid warnings about use of cast expressions as lvalues

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

---

 sound/oss/dmasound/dmasound_paula.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

35e5bbe9630387309d6640ccedbbec134c3e6151
diff --git a/sound/oss/dmasound/dmasound_paula.c b/sound/oss/dmasound/dmasound_paula.c
index f163868..5417815 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 *us
 			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 *us
 		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 *us
 		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;				\
-- 
0.99.9.GIT


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2005-12-22  4:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-22  4:50 [PATCH 18/36] m68k: dmasound_paula.c lvalues abuse (from m68k CVS) Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).