diff options
author | Eric Yilun Lin <yllin@chromium.org> | 2020-07-22 10:31:11 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-22 08:55:51 +0000 |
commit | 9652e15a8dd64e6546ba418cc9058e96375ba919 (patch) | |
tree | 5d536118196153912f523c73ebc71468fb29d8e0 /core/riscv-rv32i/task.c | |
parent | b58fffaf114f4bd35329d26d80b38c7cd8b714cc (diff) | |
download | chrome-ec-9652e15a8dd64e6546ba418cc9058e96375ba919.tar.gz |
riscv-rv32i: correct printf format
unsigned integer should use '%u' rather than '%d'
BUG=b:161768286
TEST=make BOARD=asurada
BRANCH=none
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Change-Id: I84a5419ce813a4378657c4fbfeba967262faef3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2310220
Reviewed-by: Tzung-Bi Shih <tzungbi@chromium.org>
Commit-Queue: Tzung-Bi Shih <tzungbi@chromium.org>
Diffstat (limited to 'core/riscv-rv32i/task.c')
-rw-r--r-- | core/riscv-rv32i/task.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/riscv-rv32i/task.c b/core/riscv-rv32i/task.c index f0bc5924dd..3addbcd91f 100644 --- a/core/riscv-rv32i/task.c +++ b/core/riscv-rv32i/task.c @@ -628,7 +628,7 @@ void task_print_list(void) int command_task_info(int argc, char **argv) { #ifdef CONFIG_TASK_PROFILING - int total = 0; + unsigned int total = 0; int i; #endif @@ -644,13 +644,13 @@ int command_task_info(int argc, char **argv) } } - ccprintf("Service calls: %11d\n", svc_calls); - ccprintf("Total exceptions: %11d\n", total + svc_calls); - ccprintf("Task switches: %11d\n", task_switches); - ccprintf("Task switching started: %11.6lld s\n", task_start_time); - ccprintf("Time in tasks: %11.6lld s\n", + ccprintf("Service calls: %11u\n", svc_calls); + ccprintf("Total exceptions: %11u\n", total + svc_calls); + ccprintf("Task switches: %11u\n", task_switches); + ccprintf("Task switching started: %11.6llu s\n", task_start_time); + ccprintf("Time in tasks: %11.6llu s\n", get_time().val - task_start_time); - ccprintf("Time in exceptions: %11.6lld s\n", exc_total_time); + ccprintf("Time in exceptions: %11.6llu s\n", exc_total_time); #endif return EC_SUCCESS; |