Skip to content

Commit 0cc0844

Browse files
Al ViroLinus Torvalds
authored andcommitted
frv: missing casts in cmpxchg()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 51ef9c5 commit 0cc0844

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎include/asm-frv/system.h‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,10 @@ extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new);
253253
__typeof__(*(ptr)) __xg_new = (new); \
254254
\
255255
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; \
257260
default: \
258261
__xg_orig = 0; \
259262
asm volatile("break"); \

0 commit comments

Comments
 (0)