From 7200037dfc674977bffc3d58a15547d97f3ef681 Mon Sep 17 00:00:00 2001 From: Evan Green Date: Mon, 23 Sep 2019 13:19:18 -0700 Subject: printf: Fix formatting errors This change fixes the printf formatting errors found by the compile-time prinf format checker. The errors fall into a few categories: 1. Incorrect size specifier (missing or extra l). 2. Missing or extra arguments. 3. Bad line splitting. BUG=chromium:984041 TEST=make -j buildall BRANCH=none Change-Id: I5618097a581210b9fcbfc81560dec050ae30b61c Signed-off-by: Evan Green Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1819653 Reviewed-by: Jack Rosenthal --- common/motion_sense.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'common/motion_sense.c') diff --git a/common/motion_sense.c b/common/motion_sense.c index ef9cdef185..73659ab161 100644 --- a/common/motion_sense.c +++ b/common/motion_sense.c @@ -155,11 +155,11 @@ int motion_sense_set_data_rate(struct motion_sensor_t *sensor) return ret; #ifdef CONFIG_CONSOLE_VERBOSE - CPRINTS("%s ODR: %d - roundup %d from config %d [AP %d]", + CPRINTS("%s ODR: %d - roundup %d from config %d [AP %ld]", sensor->name, odr, roundup, config_id, BASE_ODR(sensor->config[SENSOR_CONFIG_AP].odr)); #else - CPRINTS("%c%d ODR %d rup %d cfg %d AP %d", + CPRINTS("%c%d ODR %d rup %d cfg %d AP %ld", sensor->name[0], sensor->type, odr, roundup, config_id, BASE_ODR(sensor->config[SENSOR_CONFIG_AP].odr)); #endif @@ -1669,7 +1669,7 @@ static int command_display_accel_info(int argc, char **argv) ccprintf("max_freq: %d\n", motion_sensors[i].max_frequency); ccprintf("config:\n"); for (j = 0; j < SENSOR_CONFIG_MAX; j++) { - ccprintf("%d - odr: %umHz, ec_rate: %uus\n", j, + ccprintf("%d - odr: %lumHz, ec_rate: %uus\n", j, motion_sensors[i].config[j].odr & ~ROUND_UP_FLAG, motion_sensors[i].config[j].ec_rate); -- cgit v1.2.1