diff options
author | Evan Green <evgreen@chromium.org> | 2019-10-01 13:39:24 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-10-05 00:47:56 +0000 |
commit | 1d82a0592eedcfdaf666111a4ff8e6a9665fa014 (patch) | |
tree | 02d30616c04b4e945647dacfb6d254223a593a9f /common/motion_sense.c | |
parent | 3247d52abeb0ccacc49f0d18dadf47c77f8f0177 (diff) | |
download | chrome-ec-1d82a0592eedcfdaf666111a4ff8e6a9665fa014.tar.gz |
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 <evgreen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1834601
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: caveh jalali <caveh@chromium.org>
Diffstat (limited to 'common/motion_sense.c')
-rw-r--r-- | common/motion_sense.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |