diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-06-17 13:06:34 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-06-17 13:06:34 +0300 |
commit | 410df0c5748f6c5a53847d2acb163dc7cd8b6c51 (patch) | |
tree | 0c0f547f90a73ec6d30851f93720e0eb24f353eb /arch/arc/include | |
parent | fff9b6c7d26943a8eb32b58364b7ec6b9369746a (diff) | |
parent | 9e0babf2c06c73cda2c0cd37a1653d823adb40ec (diff) | |
download | linux-410df0c5748f6c5a53847d2acb163dc7cd8b6c51.tar.xz |
Merge tag 'v5.2-rc5' into locking/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/arc/include')
-rw-r--r-- | arch/arc/include/asm/cmpxchg.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/arc/include/asm/cmpxchg.h b/arch/arc/include/asm/cmpxchg.h index d819de1c5d10..3ea4112c8302 100644 --- a/arch/arc/include/asm/cmpxchg.h +++ b/arch/arc/include/asm/cmpxchg.h @@ -92,8 +92,11 @@ __cmpxchg(volatile void *ptr, unsigned long expected, unsigned long new) #endif /* CONFIG_ARC_HAS_LLSC */ -#define cmpxchg(ptr, o, n) ((typeof(*(ptr)))__cmpxchg((ptr), \ - (unsigned long)(o), (unsigned long)(n))) +#define cmpxchg(ptr, o, n) ({ \ + (typeof(*(ptr)))__cmpxchg((ptr), \ + (unsigned long)(o), \ + (unsigned long)(n)); \ +}) /* * atomic_cmpxchg is same as cmpxchg @@ -198,8 +201,11 @@ static inline unsigned long __xchg(unsigned long val, volatile void *ptr, return __xchg_bad_pointer(); } -#define xchg(ptr, with) ((typeof(*(ptr)))__xchg((unsigned long)(with), (ptr), \ - sizeof(*(ptr)))) +#define xchg(ptr, with) ({ \ + (typeof(*(ptr)))__xchg((unsigned long)(with), \ + (ptr), \ + sizeof(*(ptr))); \ +}) #endif /* CONFIG_ARC_PLAT_EZNPS */ |