From: Al Viro Date: Sun, 14 Oct 2007 18:35:10 +0000 (+0100) Subject: frv: missing casts in cmpxchg() X-Git-Tag: v2.6.24-rc1~1313 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cc0844bc6d0bfca97fda48fa28d1f0a7cf878cb;p=linux-2.6 frv: missing casts in cmpxchg() Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- diff --git a/include/asm-frv/system.h b/include/asm-frv/system.h index 6931af525d..9f5663ba19 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"); \