Re: [PATCH] sched/fair: Fix unused prototype warning

From: Mel Gorman
Date: Wed Feb 26 2020 - 10:07:28 EST


On Wed, Feb 26, 2020 at 12:12:44PM +0000, Valentin Schneider wrote:
> Building against the latest tip/sched/core
>
> a0f03b617c3b ("sched/numa: Stop an exhastive search if a reasonable swap candidate or idle CPU is found")
>
> with the arm64 defconfig (which doesn't have CONFIG_SCHED_SMT set) leads
> to:
>
> kernel/sched/fair.c:1525:20: warning: ???test_idle_cores??? declared ???static??? but never defined [-Wunused-function]
> static inline bool test_idle_cores(int cpu, bool def);
> ^~~~~~~~~~~~~~~
>
> Rather than define it in its own CONFIG_SCHED_SMT #define island, bunch it
> up with test_idle_cores().
>
> Signed-off-by: Valentin Schneider <valentin.schneider@xxxxxxx>

Acked-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>

Ingo, what is your preferred method for dealing with this situation
in tip? A resubmission of "sched/numa: Stop an exhastive search if a
reasonable swap candidate or idle CPU is found" with these folded together
or Valentin's patch on top?

--
Mel Gorman
SUSE Labs