From c3b3b8f43b49e4fa8fde5e916cd8d573687e3626 Mon Sep 17 00:00:00 2001 From: Atish Patra Date: Fri, 21 Feb 2020 15:47:53 -0800 Subject: [PATCH] lib: Fix typo in atomic exchange functions There is a typo in atomic operations code which prevents the usage of riscv atomic instructions even if it is supported. Fix the typo. Signed-off-by: Atish Patra Reviewed-by: Anup Patel --- lib/sbi/riscv_atomic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sbi/riscv_atomic.c b/lib/sbi/riscv_atomic.c index 43318640..8b85801d 100644 --- a/lib/sbi/riscv_atomic.c +++ b/lib/sbi/riscv_atomic.c @@ -79,7 +79,7 @@ long atomic_sub_return(atomic_t *atom, long value) #define axchg(ptr, x) \ ({ \ __typeof__(*(ptr)) _x_ = (x); \ - (__typeof__(*(ptr))) __xchg((ptr), _x_, sizeof(*(ptr))); \ + (__typeof__(*(ptr))) __axchg((ptr), _x_, sizeof(*(ptr))); \ })