diff options
| author | Alex Deucher <alexander.deucher@amd.com> | 2019-06-25 08:42:25 -0500 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2019-06-25 08:42:25 -0500 |
| commit | d7929c1e13e3788e7cb741d75b5baec5e53eff21 (patch) | |
| tree | cf513071edfc4499b4e025e4846244c9d0e4c6bd /arch/arc/include/asm/cmpxchg.h | |
| parent | 8ac875db0fdc1cfa55c424b38a81cf5282f3df0b (diff) | |
| parent | 80d42db02b3a5beb8cffba08207adf5f4c525ee3 (diff) | |
| download | blackbird-op-linux-d7929c1e13e3788e7cb741d75b5baec5e53eff21.tar.gz blackbird-op-linux-d7929c1e13e3788e7cb741d75b5baec5e53eff21.zip | |
Merge branch 'drm-next' into drm-next-5.3
Backmerge drm-next and fix up conflicts due to drmP.h removal.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'arch/arc/include/asm/cmpxchg.h')
| -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 */ |

