summaryrefslogtreecommitdiff
path: root/common/mkbp_fifo.c
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2022-06-27 14:37:39 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-29 12:14:45 +0000
commit229f2eed81a96167ac691df65a54cb01e110a48d (patch)
tree0dd4a1546cf0f55a1bdb4f7d7e10284754b21c59 /common/mkbp_fifo.c
parent3a95669fa75e048f3083c2a98b93216dd8ba3a25 (diff)
downloadchrome-ec-229f2eed81a96167ac691df65a54cb01e110a48d.tar.gz
common/mkbp_fifo.c: Format with clang-format
BUG=b:236386294 BRANCH=none TEST=none Change-Id: I61f3b3325ba1bf8770ec5f00cc28286f54eab89c Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729672 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'common/mkbp_fifo.c')
-rw-r--r--common/mkbp_fifo.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/common/mkbp_fifo.c b/common/mkbp_fifo.c
index c394d9fc77..90c519112f 100644
--- a/common/mkbp_fifo.c
+++ b/common/mkbp_fifo.c
@@ -15,7 +15,7 @@
#include "util.h"
/* Console output macros */
-#define CPRINTS(format, args...) cprints(CC_KEYBOARD, format, ## args)
+#define CPRINTS(format, args...) cprints(CC_KEYBOARD, format, ##args)
/*
* Common FIFO depth. This needs to be big enough not to overflow if a
@@ -26,9 +26,9 @@
* which is non-trivial but not horrible.
*/
-static uint32_t fifo_start; /* first entry */
-static uint32_t fifo_end; /* last entry */
-static atomic_t fifo_entries; /* number of existing entries */
+static uint32_t fifo_start; /* first entry */
+static uint32_t fifo_end; /* last entry */
+static atomic_t fifo_entries; /* number of existing entries */
static uint8_t fifo_max_depth = FIFO_DEPTH;
static struct ec_response_get_next_event fifo[FIFO_DEPTH];
@@ -114,7 +114,6 @@ void mkbp_fifo_depth_update(uint8_t new_max_depth)
fifo_max_depth = new_max_depth;
}
-
void mkbp_fifo_clear_keyboard(void)
{
int i, new_fifo_entries = 0;
@@ -180,8 +179,7 @@ test_mockable int mkbp_fifo_add(uint8_t event_type, const uint8_t *buffp)
mutex_lock(&fifo_add_mutex);
if (fifo_entries >= fifo_max_depth) {
mutex_unlock(&fifo_add_mutex);
- CPRINTS("MKBP common FIFO depth %d reached",
- fifo_max_depth);
+ CPRINTS("MKBP common FIFO depth %d reached", fifo_max_depth);
return EC_ERROR_OVERFLOW;
}