shell: modules: kernel: streamline code

This commit includes cleanups to `kernel_service`:
- `shell_tdata_dump()`:
  Adjust formatting to align with `.clang-format`.
- `shell_stack_dump()`:
  Update to pass `sh` directly instead of `user_data` since
  it is already assigned.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This commit is contained in:
Pisit Sawangvonganan 2024-10-08 08:12:50 +07:00 committed by Benjamin Cabé
commit b44250ae46
2 changed files with 10 additions and 10 deletions

View file

@ -41,8 +41,8 @@ static void shell_stack_dump(const struct k_thread *thread, void *user_data)
/* Calculate the real size reserved for the stack */
pcnt = ((size - unused) * 100U) / size;
shell_print(
(const struct shell *)user_data, "%p %-" STRINGIFY(THREAD_MAX_NAM_LEN) "s "
shell_print(sh,
"%p %-" STRINGIFY(THREAD_MAX_NAM_LEN) "s "
"(real size %4zu):\tunused %4zu\tusage %4zu / %4zu (%2u %%)",
thread, tname ? tname : "NA", size, unused, size - unused, size, pcnt);
}