summaryrefslogtreecommitdiff
path: root/chip/stm32/usart_info_command.c
diff options
context:
space:
mode:
authorDawid Niedzwiecki <dn@semihalf.com>2020-10-28 10:02:32 +0100
committerCommit Bot <commit-bot@chromium.org>2020-11-02 10:17:27 +0000
commit71069893536962157b3b25330851a1c2c7cd6da5 (patch)
tree22c6f60ff900b68871f81e44cfe01b7616561bb6 /chip/stm32/usart_info_command.c
parent0438542f2690e958d47dd28636797acbd29fcd9d (diff)
downloadchrome-ec-71069893536962157b3b25330851a1c2c7cd6da5.tar.gz
atomic: rename atomic_read_clear to atomic_clear
Rename atomic_read_clear to atomic_clear to be consistent with the rest of the atomic functions, which return the previous value of the variable. BUG=b:169151160 BRANCH=none TEST=buildall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I2588971bd7687879a28ec637cf5f6c3d27d393f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2505143 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'chip/stm32/usart_info_command.c')
-rw-r--r--chip/stm32/usart_info_command.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/chip/stm32/usart_info_command.c b/chip/stm32/usart_info_command.c
index 4e77f12980..2649a97351 100644
--- a/chip/stm32/usart_info_command.c
+++ b/chip/stm32/usart_info_command.c
@@ -20,14 +20,13 @@ static int command_usart_info(int argc, char **argv)
if (config == NULL)
continue;
- ccprintf("USART%d\n"
- " dropped %d bytes\n"
- " overran %d times\n",
- config->hw->index + 1,
- atomic_read_clear(
- (uint32_t *)&(config->state->rx_dropped)),
- atomic_read_clear(
- (uint32_t *)&(config->state->rx_overrun)));
+ ccprintf(
+ "USART%d\n"
+ " dropped %d bytes\n"
+ " overran %d times\n",
+ config->hw->index + 1,
+ atomic_clear((uint32_t *)&(config->state->rx_dropped)),
+ atomic_clear((uint32_t *)&(config->state->rx_overrun)));
if (config->rx->info)
config->rx->info(config);