diff options
author | Denis Brockus <dbrockus@google.com> | 2021-09-21 09:30:24 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-21 21:56:06 +0000 |
commit | 8de594d466d276ca5d8ab617687ed11302041cc2 (patch) | |
tree | 5d8a07ec290fa467da1aae59b33b7a9481026338 | |
parent | 0bff067f036a89bcc61bf8afcb8e1be08e412dae (diff) | |
download | chrome-ec-8de594d466d276ca5d8ab617687ed11302041cc2.tar.gz |
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 <dbrockus@google.com>
Change-Id: I7a64fddb1174e57ed0e04ef1502310d8494e860d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3173092
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r-- | zephyr/shim/include/atomic.h | 4 |
1 files changed, 2 insertions, 2 deletions
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 <sys/atomic.h> -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 */ |