arm64: atomics: Undefine internal macros after use
[sfrench/cifs-2.6.git] / arch / arm64 / include / asm / cmpxchg.h
index afaba73e0b2c0d9984d62975f5619e55a0ba4e63..a1398f2f9994fcdc0e110731feffa550ab765964 100644 (file)
@@ -129,6 +129,8 @@ __CMPXCHG_CASE(mb_, 16)
 __CMPXCHG_CASE(mb_, 32)
 __CMPXCHG_CASE(mb_, 64)
 
+#undef __CMPXCHG_CASE
+
 #define __CMPXCHG_DBL(name)                                            \
 static inline long __cmpxchg_double##name(unsigned long old1,          \
                                         unsigned long old2,            \
@@ -143,6 +145,8 @@ static inline long __cmpxchg_double##name(unsigned long old1,               \
 __CMPXCHG_DBL(   )
 __CMPXCHG_DBL(_mb)
 
+#undef __CMPXCHG_DBL
+
 #define __CMPXCHG_GEN(sfx)                                             \
 static inline unsigned long __cmpxchg##sfx(volatile void *ptr,         \
                                           unsigned long old,           \