diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2019-07-16 03:23:59 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-07-17 11:19:54 +0000 |
commit | cb59e6d1dc263a35c9f1f97e042aef8dce71a3a3 (patch) | |
tree | 64ff9f0fb2625cbacecf351844ec25e587717a43 /driver/gyro_l3gd20h.c | |
parent | 03ca813082a84001ce5e78c81da841a60c234975 (diff) | |
download | chrome-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 'driver/gyro_l3gd20h.c')
-rw-r--r-- | driver/gyro_l3gd20h.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/driver/gyro_l3gd20h.c b/driver/gyro_l3gd20h.c index 44ee89c9a3..4fcaf15ed0 100644 --- a/driver/gyro_l3gd20h.c +++ b/driver/gyro_l3gd20h.c @@ -17,6 +17,7 @@ #include "util.h" #define CPUTS(outstr) cputs(CC_ACCEL, outstr) +#define CPRINTS(format, args...) cprints(CC_ACCEL, format, ## args) #define CPRINTF(format, args...) cprintf(CC_ACCEL, format, ## args) /* @@ -301,7 +302,7 @@ static int is_data_ready(const struct motion_sensor_t *s, int *ready) ret = raw_read8(s->port, s->addr, L3GD20_STATUS_REG, &tmp); if (ret != EC_SUCCESS) { - CPRINTF("[%T %s type:0x%X RS Error]", s->name, s->type); + CPRINTS("%s type:0x%X RS Error", s->name, s->type); return ret; } @@ -338,8 +339,7 @@ static int read(const struct motion_sensor_t *s, intv3_t v) i2c_block_read(s->port, s->addr, xyz_reg, raw, 6); if (ret != EC_SUCCESS) { - CPRINTF("[%T %s type:0x%X RD XYZ Error]", - s->name, s->type); + CPRINTS("%s type:0x%X RD XYZ Error", s->name, s->type); return ret; } |