kernel: usage: fix unused-variable warning when THREAD_USAGE_ALL=n

With CONFIG_SCHED_THREAD_USAGE_ANALYSIS=y and
CONFIG_SCHED_THREAD_USAGE_ALL=n, sched_cpu_update_usage() is a no-op
macro, so the cycles local in k_thread_runtime_stats_enable() and
z_thread_stats_reset() is set but never read, triggering a compiler
warning. Pass the expression straight to the macro to keep
that configuration warning-free.

Signed-off-by: Yiren Guo <guoyr_2013@hotmail.com>
1 file changed