diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2021-11-29 11:08:48 +0100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-12-08 09:02:59 +0000 |
commit | 4f7cd7509d7a02b1d5f3f0fd3885202350b576f1 (patch) | |
tree | aadf304662b4436fcdbe352fcc27c009967faf7c /common/host_event_commands.c | |
parent | de14a76701c668270f19c8d6af41aaa321f1c8c2 (diff) | |
download | chrome-ec-4f7cd7509d7a02b1d5f3f0fd3885202350b576f1.tar.gz |
atomic: use atomic_t where it is possible
There are several places where atomic_t can be a type variables that
are use with atomic_* operation, so use it.
It sometimes has an impact on the asm code, but it is not significant.
The change will be useful for incoming commits related to modifying
atomic_t caused by a change in Zephyr upstream (atomic_t from int to
long).
BUG=b:207082842
TEST=make buildall && zmake testall
BRANCH=main
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: I5c7fa6b74b84454b22074a2a00b5f10003ee9843
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3306358
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
Diffstat (limited to 'common/host_event_commands.c')
-rw-r--r-- | common/host_event_commands.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/host_event_commands.c b/common/host_event_commands.c index 1856c88c37..532cfe3be3 100644 --- a/common/host_event_commands.c +++ b/common/host_event_commands.c @@ -264,7 +264,7 @@ static struct lazy_wake_masks { static void host_events_atomic_or(host_event_t *e, host_event_t m) { - uint32_t *ptr = (uint32_t *)e; + atomic_t *ptr = (atomic_t *)e; atomic_or(ptr, (uint32_t)m); #ifdef CONFIG_HOST_EVENT64 @@ -274,7 +274,7 @@ static void host_events_atomic_or(host_event_t *e, host_event_t m) static void host_events_atomic_clear(host_event_t *e, host_event_t m) { - uint32_t *ptr = (uint32_t *)e; + atomic_t *ptr = (atomic_t *)e; atomic_clear_bits(ptr, (uint32_t)m); #ifdef CONFIG_HOST_EVENT64 |