From 8de594d466d276ca5d8ab617687ed11302041cc2 Mon Sep 17 00:00:00 2001 From: Denis Brockus Date: Tue, 21 Sep 2021 09:30:24 -0600 Subject: zephyr: shim: atomic_clear_bits should return a value All of the other atomic operations return an atomic_val_t value. This should be so for atomic_clear_bits as well. The standard return value is the field value prior to applying the operation to it. BUG=b:141363146 BRANCH=none TEST=zmake configure -b $PROJ_HAYATO Signed-off-by: Denis Brockus Change-Id: I7a64fddb1174e57ed0e04ef1502310d8494e860d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3173092 Auto-Submit: Denis Brockus Tested-by: Denis Brockus Commit-Queue: Denis Brockus Commit-Queue: Keith Short Reviewed-by: Keith Short --- zephyr/shim/include/atomic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'zephyr/shim/include/atomic.h') diff --git a/zephyr/shim/include/atomic.h b/zephyr/shim/include/atomic.h index 5ae6635f75..ad534d116b 100644 --- a/zephyr/shim/include/atomic.h +++ b/zephyr/shim/include/atomic.h @@ -8,9 +8,9 @@ #include -static inline void atomic_clear_bits(atomic_t *addr, atomic_val_t bits) +static inline atomic_val_t atomic_clear_bits(atomic_t *addr, atomic_val_t bits) { - atomic_and(addr, ~bits); + return atomic_and(addr, ~bits); } #endif /* __CROS_EC_ATOMIC_H */ -- cgit v1.2.1