diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2019-05-17 09:35:24 -0600 |
---|---|---|
committer | Jett Rink <jettrink@chromium.org> | 2019-05-22 20:39:49 +0000 |
commit | f9fa865f87b8dc4bbeb9ea03073811e60f9badb0 (patch) | |
tree | 143b21ef5625b6f19d2b893eacc4dd79c11ae993 | |
parent | 1b1a8a52d5c2541695e4b9db1460c0abeac3028e (diff) | |
download | chrome-ec-f9fa865f87b8dc4bbeb9ea03073811e60f9badb0.tar.gz |
ish: fix printf format for idlestats command
%ld is for signed numbers, but these are unsigned.
BUG=b:132929262
BRANCH=none
TEST=used idlestats command on arcada, verified correct output
Change-Id: Iffe405ae0d62159d8036248593ed0993e7a5742a
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1617068
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1625784
Commit-Queue: Jett Rink <jettrink@chromium.org>
Tested-by: Jett Rink <jettrink@chromium.org>
-rw-r--r-- | chip/ish/power_mgt.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/chip/ish/power_mgt.c b/chip/ish/power_mgt.c index 7fe5031b32..06d910479d 100644 --- a/chip/ish/power_mgt.c +++ b/chip/ish/power_mgt.c @@ -634,41 +634,41 @@ static int command_idle_stats(int argc, char **argv) ccprintf("Aontask exist: %s\n", pm_ctx.aon_valid ? "Yes" : "No"); ccprintf("Idle sleep:\n"); ccprintf(" D0i0:\n"); - ccprintf(" counts: %ld\n", pm_stats.d0i0_cnt); - ccprintf(" time: %.6lds\n", pm_stats.d0i0_time_us); + ccprintf(" counts: %lu\n", pm_stats.d0i0_cnt); + ccprintf(" time: %.6lus\n", pm_stats.d0i0_time_us); ccprintf("Deep sleep:\n"); #ifdef CONFIG_ISH_PM_D0I1 ccprintf(" D0i1:\n"); - ccprintf(" counts: %ld\n", pm_stats.d0i1_cnt); - ccprintf(" time: %.6lds\n", pm_stats.d0i1_time_us); + ccprintf(" counts: %lu\n", pm_stats.d0i1_cnt); + ccprintf(" time: %.6lus\n", pm_stats.d0i1_time_us); #endif #ifdef CONFIG_ISH_PM_D0I2 if (pm_ctx.aon_valid) { ccprintf(" D0i2:\n"); - ccprintf(" counts: %ld\n", pm_stats.d0i2_cnt); - ccprintf(" time: %.6lds\n", pm_stats.d0i2_time_us); + ccprintf(" counts: %lu\n", pm_stats.d0i2_cnt); + ccprintf(" time: %.6lus\n", pm_stats.d0i2_time_us); } #endif #ifdef CONFIG_ISH_PM_D0I3 if (pm_ctx.aon_valid) { ccprintf(" D0i3:\n"); - ccprintf(" counts: %ld\n", pm_stats.d0i3_cnt); - ccprintf(" time: %.6lds\n", pm_stats.d0i3_time_us); + ccprintf(" counts: %lu\n", pm_stats.d0i3_cnt); + ccprintf(" time: %.6lus\n", pm_stats.d0i3_time_us); } #endif #if defined(CONFIG_ISH_PM_D0I2) || defined(CONFIG_ISH_PM_D0I3) if (pm_ctx.aon_valid) { ccprintf(" Aontask status:\n"); - ccprintf(" last error: %d\n", aon_share->last_error); - ccprintf(" error counts: %d\n", aon_share->error_count); + ccprintf(" last error: %lu\n", aon_share->last_error); + ccprintf(" error counts: %lu\n", aon_share->error_count); } #endif - ccprintf("Total time on: %.6lds\n", get_time().val); + ccprintf("Total time on: %.6lus\n", get_time().val); return EC_SUCCESS; } |