summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtish Patra <[email protected]>2020-02-21 15:47:53 -0800
committerAnup Patel <[email protected]>2020-02-22 10:04:38 +0530
commitc3b3b8f43b49e4fa8fde5e916cd8d573687e3626 (patch)
tree76ae162de471576dc6094aa137d3f274c771fdc9
parent3e7d666d7ca5eca5b4ba9c0c624a1747bbfd7bf7 (diff)
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 <[email protected]> Reviewed-by: Anup Patel <[email protected]>
-rw-r--r--lib/sbi/riscv_atomic.c2
1 files changed, 1 insertions, 1 deletions
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))); \
})