kernel: dynamic: reduce verbosity in degenerate case

k_thread_stack_free() is designed to be called with any pointer
value. We return -EINVAL when an attempt is made to free an
invalid stack pointer.

This change reduces the verbosity in the degenerate case, when
the pointer is not obtained via k_thread_stack_alloc(), but
otherwise does not affect functionality.

If debug log verbosity is not enabled, we save a few bytes in
.text / .rodata / .strtab.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
This commit is contained in:
Christopher Friedt 2024-01-01 13:01:35 -05:00 committed by Chris Friedt
parent 5ca0f28bb2
commit 9f3d7776ab
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ int z_impl_k_thread_stack_free(k_thread_stack_t *stack)
k_free(stack);
#endif
} else {
LOG_ERR("Invalid stack %p", stack);
LOG_DBG("Invalid stack %p", stack);
return -EINVAL;
}