diff options
author | James Morris <james.l.morris@oracle.com> | 2017-03-28 11:03:35 +1100 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2017-03-28 11:03:35 +1100 |
commit | 840c91dc6a13b160f5b6e5c79c430dffac11c945 (patch) | |
tree | 5309824f4531b2611a575e7971a935d2e95feb02 /arch/openrisc/include/asm/cmpxchg.h | |
parent | 3dfc9b02864b19f4dab376f14479ee4ad1de6c9e (diff) | |
parent | c02ed2e75ef4c74e41e421acb4ef1494671585e8 (diff) | |
download | linux-840c91dc6a13b160f5b6e5c79c430dffac11c945.tar.gz |
update to v4.11-rc4 due to memory corruption bug in rc2
Diffstat (limited to 'arch/openrisc/include/asm/cmpxchg.h')
-rw-r--r-- | arch/openrisc/include/asm/cmpxchg.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/openrisc/include/asm/cmpxchg.h b/arch/openrisc/include/asm/cmpxchg.h index 5fcb9ac72693..f0a5d8b844d6 100644 --- a/arch/openrisc/include/asm/cmpxchg.h +++ b/arch/openrisc/include/asm/cmpxchg.h @@ -77,7 +77,11 @@ static inline unsigned long __xchg(unsigned long val, volatile void *ptr, return val; } -#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 /* __ASM_OPENRISC_CMPXCHG_H */ |