Skip to content

Commit 1e8af9f

Browse files
paulmckrcuvineetgarc
authored andcommitted
ARC: build: Use __force to suppress per-CPU cmpxchg warnings
Currently, the cast of the first argument to cmpxchg_emu_u8() drops the __percpu address-space designator, which results in sparse complaints when applying cmpxchg() to per-CPU variables in ARC. Therefore, use __force to suppress these complaints, given that this does not pertain to cmpxchg() semantics, which are plently well-defined on variables in general, whether per-CPU or otherwise. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Paul E. McKenney <[email protected]> Cc: <[email protected]> Signed-off-by: Vineet Gupta <[email protected]>
1 parent dd2b230 commit 1e8af9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arc/include/asm/cmpxchg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
\
4949
switch(sizeof((_p_))) { \
5050
case 1: \
51-
_prev_ = (__typeof__(*(ptr)))cmpxchg_emu_u8((volatile u8 *)_p_, (uintptr_t)_o_, (uintptr_t)_n_); \
51+
_prev_ = (__typeof__(*(ptr)))cmpxchg_emu_u8((volatile u8 *__force)_p_, (uintptr_t)_o_, (uintptr_t)_n_); \
5252
break; \
5353
case 4: \
5454
_prev_ = __cmpxchg(_p_, _o_, _n_); \

0 commit comments

Comments
 (0)