[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151112094739.0168e191@gandalf.local.home>
Date: Thu, 12 Nov 2015 09:47:39 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] sched/rt: hide push_irq_work_func declaration
On Thu, 12 Nov 2015 15:22:22 +0100
Arnd Bergmann <arnd@...db.de> wrote:
> The push_irq_work_func() function is conditionally defined only
> when both CONFIG_SMP and HAVE_RT_PUSH_IPI are defined, but the
> forward declaration remains visibile without HAVE_RT_PUSH_IPI,
> causing a gcc warning in ARM64 allnoconfig:
>
> kernel/sched/rt.c:68:13: warning: 'push_irq_work_func' declared 'static' but never defined [-Wunused-function]
>
> This changes the code to use the same condition for both the
> declaration and the function definition, which gets rid of the
> warning.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> Fixes: b6366f048e0c ("sched/rt: Use IPI to trigger RT task push migration instead of pulling")
> ---
> Found on arm64 allnoconfig
>
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index e3cc16312046..ce7b36d6f477 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -64,7 +64,7 @@ static void start_rt_bandwidth(struct rt_bandwidth *rt_b)
> raw_spin_unlock(&rt_b->rt_runtime_lock);
> }
>
> -#ifdef CONFIG_SMP
> +#if IS_ENABLED(CONFIG_SMP) && defined(HAVE_RT_PUSH_IPI)
Why IS_ENABLED() and not defined()?
#if defined(CONFIG_SMP) && defined(HAVE_RT_PUSH_IPI)
I thought IS_ENABLED() is used for C code, like:
if (IS_ENABLED(CONFIG_SMP)) {
[...]
}
-- Steve
> static void push_irq_work_func(struct irq_work *work);
> #endif
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists