diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2020-09-24 09:20:41 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-06 09:44:48 +0000 |
commit | 32b7e8875e0a08290168ec7dda040d5a5db513fa (patch) | |
tree | c1336b4c3c0a5e037618bef1ae944485e3f7840b /common/usbc/usb_pe_drp_sm.c | |
parent | b536c348359487f0408a17af8d9d506f5a1d18a6 (diff) | |
download | chrome-ec-32b7e8875e0a08290168ec7dda040d5a5db513fa.tar.gz |
core: rename atomic_clear to atomic_clear_bits
Change the name of atomic_clear to atomic_clear_bits to make to name more
clear - the function clears only selected bits, but the name may suggest
that it clears the whole variable.
It is done as a part of porting to Zephyr, where atomic_clear zeros the
variable.
BUG=b:169151160
BRANCH=none
TEST=buildall
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: I7b0b47959c6c54af40f61bca8d9baebaa0375970
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2428943
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'common/usbc/usb_pe_drp_sm.c')
-rw-r--r-- | common/usbc/usb_pe_drp_sm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/common/usbc/usb_pe_drp_sm.c b/common/usbc/usb_pe_drp_sm.c index c64d8386ae..210bb9d1d8 100644 --- a/common/usbc/usb_pe_drp_sm.c +++ b/common/usbc/usb_pe_drp_sm.c @@ -65,7 +65,8 @@ #define PE_SET_FLAG(port, flag) deprecated_atomic_or(&pe[port].flags, (flag)) -#define PE_CLR_FLAG(port, flag) deprecated_atomic_clear(&pe[port].flags, (flag)) +#define PE_CLR_FLAG(port, flag) \ + deprecated_atomic_clear_bits(&pe[port].flags, (flag)) #define PE_CHK_FLAG(port, flag) (pe[port].flags & (flag)) /* @@ -75,7 +76,7 @@ #define PE_SET_DPM_REQUEST(port, req) \ deprecated_atomic_or(&pe[port].dpm_request, (req)) #define PE_CLR_DPM_REQUEST(port, req) \ - deprecated_atomic_clear(&pe[port].dpm_request, (req)) + deprecated_atomic_clear_bits(&pe[port].dpm_request, (req)) #define PE_CHK_DPM_REQUEST(port, req) (pe[port].dpm_request & (req)) /* @@ -6156,7 +6157,7 @@ void pd_dfp_discovery_init(int port) void pd_discovery_access_clear(int port, enum tcpm_transmit_type type) { - deprecated_atomic_clear(&task_access[port][type], 0xFFFFFFFF); + deprecated_atomic_clear_bits(&task_access[port][type], 0xFFFFFFFF); } bool pd_discovery_access_validate(int port, enum tcpm_transmit_type type) |