summaryrefslogtreecommitdiff
path: root/common/gesture.c
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2019-07-16 03:23:59 -0600
committerCommit Bot <commit-bot@chromium.org>2019-07-17 11:19:54 +0000
commitcb59e6d1dc263a35c9f1f97e042aef8dce71a3a3 (patch)
tree64ff9f0fb2625cbacecf351844ec25e587717a43 /common/gesture.c
parent03ca813082a84001ce5e78c81da841a60c234975 (diff)
downloadchrome-ec-cb59e6d1dc263a35c9f1f97e042aef8dce71a3a3.tar.gz
cleanup: refactor CPRINTF("[%T ...]\n") to CPRINTS
Looking at where the non-standard %T printf modifier is used in EC codebase, the majority is cases where CPRINTS could have been used instead of CPRINTF. This is a somewhat-mechanical refactor of these cases, which will make implementing a standard printf easier. BUG=chromium:984041 BRANCH=none TEST=buildall Change-Id: I75ea0be261bfbfa50fb850a0a37fe2ca6ab67cb9 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1703128 Reviewed-by: Evan Green <evgreen@chromium.org>
Diffstat (limited to 'common/gesture.c')
-rw-r--r--common/gesture.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/common/gesture.c b/common/gesture.c
index 35eddd0daa..b5e3c99851 100644
--- a/common/gesture.c
+++ b/common/gesture.c
@@ -261,14 +261,15 @@ static int gesture_tap_for_battery(void)
CPRINTS("tap st %d->%d, error div by 0",
state_p, state);
else
- CPRINTF("[%T tap st %d->%d, st_cnt %-3d ",
- state_p, state, state_cnt);
- CPRINTF("Z_in:Z_out %-3d, Z_in:XY_in %-3d ",
+ CPRINTS("tap st %d->%d, st_cnt %-3d "
+ "Z_in:Z_out %-3d, Z_in:XY_in %-3d "
+ "dZ_in %-8.3d, dZ_in_max %-8.3d, "
+ "dZ_out %-8.3d",
+ state_p, state, state_cnt,
delta_z_inner / delta_z_outer,
- delta_z_inner / delta_xy_inner);
- CPRINTF("dZ_in %-8.3d, dZ_in_max %-8.3d, "
- "dZ_out %-8.3d]\n",
- delta_z_inner, delta_z_inner_max,
+ delta_z_inner / delta_xy_inner,
+ delta_z_inner,
+ delta_z_inner_max,
delta_z_outer);
}