From 1d82a0592eedcfdaf666111a4ff8e6a9665fa014 Mon Sep 17 00:00:00 2001 From: Evan Green Date: Tue, 1 Oct 2019 13:39:24 -0700 Subject: include: De-longify BIT() macro The BIT() macro was recently introduced to make things more comfortable to upstream Linux. However, there's no need for it to be a long. Change the macro back to being an int (int and long are the same on 32-bit platforms, which all of our ECs are), so that we can reduce the number of %l specifiers. The semantics of %l have changed, we are deprecating its use on master to reduce the risk that we accidentally cherry-pick one of those printfs to an old firmware branch. BUG=chromium:984041 TEST=make -j buildall BRANCH=None Change-Id: I95b9cd49895cc67998dcb1de9bab5b5591d93243 Signed-off-by: Evan Green Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1834601 Reviewed-by: Jack Rosenthal Reviewed-by: caveh jalali --- 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 73659ab161..ef9cdef185 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 %ld]", + CPRINTS("%s ODR: %d - roundup %d from config %d [AP %d]", 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 %ld", + CPRINTS("%c%d ODR %d rup %d cfg %d AP %d", 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: %lumHz, ec_rate: %uus\n", j, + ccprintf("%d - odr: %umHz, 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