Skip to content

Commit

Permalink
riscv: atomic: Cleanup unnecessary definition
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guo Ren authored and Palmer Dabbelt committed May 21, 2022

Unverified

No user is associated with the committer email.
1 parent 19bc59b commit dd8437c
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions arch/riscv/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
@@ -348,18 +348,6 @@
#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); \

0 comments on commit dd8437c

Please sign in to comment.