[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 3 Mar 2020 09:10:02 +0100
From: Vincent Guittot <vincent.guittot@...aro.org>
To: Anshuman Khandual <anshuman.khandual@....com>
Cc: linux-kernel <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Stephen Rothwell <sfr@...b.auug.org.au>,
linux-next@...r.kernel.org
Subject: Re: [PATCH] sched/fair: Conditionally enable test_idle_cores()
forward declaration
Hi Anshuman,
On Tue, 3 Mar 2020 at 05:30, Anshuman Khandual
<anshuman.khandual@....com> wrote:
>
> test_idle_cores()'s definition and all it's call sites are enclosed within
> CONFIG_SCHED_SMT. Hence the forward declaration needs to be conditionally
> enabled in order to prevent build warnings like the following.
>
> kernel/sched/fair.c:1524:20: warning: ‘test_idle_cores’ declared ‘static’
> but never defined [-Wunused-function]
> static inline bool test_idle_cores(int cpu, bool def);
> ^~~~~~~~~~~~~~~
similar patches has already been sent:
https://lore.kernel.org/lkml/20200226121244.7524-1-valentin.schneider@arm.com/
https://lore.kernel.org/patchwork/patch/1201059/
>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Juri Lelli <juri.lelli@...hat.com>
> Cc: Vincent Guittot <vincent.guittot@...aro.org>
> Cc: Dietmar Eggemann <dietmar.eggemann@....com>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Cc: Ben Segall <bsegall@...gle.com>
> Cc: Mel Gorman <mgorman@...e.de>
> Cc: sfr@...b.auug.org.au
> Cc: linux-next@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@....com>
> ---
> This patch solves a build problem that exists on next-20200302.
>
> kernel/sched/fair.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 84594f8..827087f 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -1521,7 +1521,9 @@ static inline bool is_core_idle(int cpu)
> }
>
> /* Forward declarations of select_idle_sibling helpers */
> +#ifdef CONFIG_SCHED_SMT
> static inline bool test_idle_cores(int cpu, bool def);
> +#endif
>
> struct task_numa_env {
> struct task_struct *p;
> --
> 2.7.4
>
Powered by blists - more mailing lists