Re: [PATCH] sched/fair: Fix an unused function warning

From: Valentin Schneider
Date: Wed Apr 21 2021 - 10:14:35 EST



Hi,

On 21/04/21 16:01, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> Without CONFIG_NO_HZ_COMMON, there is now a warning about update_nohz_stats
> after the last caller outside the #ifdef was removed
>
> kernel/sched/fair.c:8433:13: error: 'update_nohz_stats' defined but not used [-Werror=unused-function]
> 8433 | static bool update_nohz_stats(struct rq *rq)
>
> Simplify the function by removing the #ifdef inside it and move it into
> the block in which it gets called.
>
> Fixes: 0826530de3cb ("sched/fair: Remove update of blocked load from newidle_balance")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

That should be covered by:

3f5ad91488e8 ("sched/fair: Move update_nohz_stats() to the CONFIG_NO_HZ_COMMON block to simplify the code & fix an unused function warning")

which currently sits in tip/sched/core. We might want to shove that in
tip/sched/urgent along with the latest in-flight fixes.