Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

frv: missing casts in cmpxchg()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Al Viro and committed by
Linus Torvalds
0cc0844b 51ef9c57

+4 -1
+4 -1
include/asm-frv/system.h
··· 253 253 __typeof__(*(ptr)) __xg_new = (new); \ 254 254 \ 255 255 switch (sizeof(__xg_orig)) { \ 256 - case 4: __xg_orig = __cmpxchg_32(__xg_ptr, __xg_test, __xg_new); break; \ 256 + case 4: __xg_orig = (__force __typeof__(*ptr)) \ 257 + __cmpxchg_32((__force uint32_t *)__xg_ptr, \ 258 + (__force uint32_t)__xg_test, \ 259 + (__force uint32_t)__xg_new); break; \ 257 260 default: \ 258 261 __xg_orig = 0; \ 259 262 asm volatile("break"); \