arch: riscv: remove unnecessary cast

Remove unnecessary cast of `fp` into `uintptr_t`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
This commit is contained in:
Yong Cong Sin 2024-05-13 17:44:03 +08:00 committed by Alberto Escolar
parent 8c8123466a
commit a82a54cd38

View file

@ -87,11 +87,11 @@ static void unwind_stack(const z_arch_esf_t *esf)
LOG_ERR("call trace:");
for (int i = 0; (i < MAX_STACK_FRAMES) && (fp != 0U) && in_stack_bound((uintptr_t)fp);) {
for (int i = 0; (i < MAX_STACK_FRAMES) && (fp != 0U) && in_stack_bound(fp);) {
frame = (struct stackframe *)fp - 1;
ra = frame->ra;
if (in_text_region(ra)) {
LOG_ERR(" %2d: fp: " PR_REG " ra: " PR_REG, i, (uintptr_t)fp, ra);
LOG_ERR(" %2d: fp: " PR_REG " ra: " PR_REG, i, fp, ra);
/*
* Increment the iterator only if `ra` is within the text region to get the
* most out of it