Skip to content

Commit 9f3d777

Browse files
Christopher Friedtcfriedt
authored andcommitted
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 <[email protected]>
1 parent 5ca0f28 commit 9f3d777

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/dynamic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ int z_impl_k_thread_stack_free(k_thread_stack_t *stack)
156156
k_free(stack);
157157
#endif
158158
} else {
159-
LOG_ERR("Invalid stack %p", stack);
159+
LOG_DBG("Invalid stack %p", stack);
160160
return -EINVAL;
161161
}
162162

0 commit comments

Comments
 (0)