riscv: atomic: Cleanup unnecessary definition
authorGuo Ren <guoren@linux.alibaba.com>
Thu, 5 May 2022 03:55:22 +0000 (11:55 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Sat, 21 May 2022 17:31:45 +0000 (10:31 -0700)
The cmpxchg32 & cmpxchg32_local are not used in Linux anymore. So
clean up asm/cmpxchg.h.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
Link: https://lore.kernel.org/r/20220505035526.2974382-2-guoren@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/cmpxchg.h

index 36dc962f634366002ce6861c8aacb74bf0a480ea..12debce235e52d04ecccc057defa96b10672f885 100644 (file)
 #define arch_cmpxchg_local(ptr, o, n)                                  \
        (__cmpxchg_relaxed((ptr), (o), (n), sizeof(*(ptr))))
 
-#define cmpxchg32(ptr, o, n)                                           \
-({                                                                     \
-       BUILD_BUG_ON(sizeof(*(ptr)) != 4);                              \
-       arch_cmpxchg((ptr), (o), (n));                                  \
-})
-
-#define cmpxchg32_local(ptr, o, n)                                     \
-({                                                                     \
-       BUILD_BUG_ON(sizeof(*(ptr)) != 4);                              \
-       arch_cmpxchg_relaxed((ptr), (o), (n))                           \
-})
-
 #define arch_cmpxchg64(ptr, o, n)                                      \
 ({                                                                     \
        BUILD_BUG_ON(sizeof(*(ptr)) != 8);                              \