public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] frv: missing casts in cmpxchg()
@ 2007-10-14 18:35 Al Viro
  2007-10-15 10:03 ` David Howells
  0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2007-10-14 18:35 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, dhowells


Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 include/asm-frv/system.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/include/asm-frv/system.h b/include/asm-frv/system.h
index 6931af5..9f5663b 100644
--- a/include/asm-frv/system.h
+++ b/include/asm-frv/system.h
@@ -253,7 +253,10 @@ extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new);
 	__typeof__(*(ptr)) __xg_new = (new);					\
 										\
 	switch (sizeof(__xg_orig)) {						\
-	case 4: __xg_orig = __cmpxchg_32(__xg_ptr, __xg_test, __xg_new); break;	\
+	case 4: __xg_orig = (__force __typeof__(*ptr))				\
+			__cmpxchg_32((__force uint32_t *)__xg_ptr,		\
+					 (__force uint32_t)__xg_test,		\
+					 (__force uint32_t)__xg_new); break;	\
 	default:								\
 		__xg_orig = 0;							\
 		asm volatile("break");						\
-- 
1.5.3.GIT



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-15 10:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-14 18:35 [PATCH] frv: missing casts in cmpxchg() Al Viro
2007-10-15 10:03 ` David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox