[PATCH] frv: missing casts in cmpxchg()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Al Viro
Date: Sunday, October 14, 2007 - 11:35 am

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


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] frv: missing casts in cmpxchg(), Al Viro, (Sun Oct 14, 11:35 am)
Re: [PATCH] frv: missing casts in cmpxchg(), David Howells, (Mon Oct 15, 3:03 am)