[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6451ced9-1e65-d146-ac9b-a83f32c97685@codeaurora.org>
Date: Fri, 29 Mar 2019 18:14:28 +0530
From: Mukesh Ojha <mojha@...eaurora.org>
To: Borislav Petkov <bp@...en8.de>, LKML <linux-kernel@...r.kernel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Valentin Schneider <valentin.schneider@....com>,
Frederic Weisbecker <fweisbec@...il.com>, x86@...nel.org
Subject: Re: [PATCH] tick/broadcast: Fix warning about undefined
tick_broadcast_oneshot_offline()
On 3/29/2019 4:35 PM, Borislav Petkov wrote:
> From: Borislav Petkov <bp@...e.de>
>
> Randconfig builds with
>
> CONFIG_TICK_ONESHOT=y
> CONFIG_HOTPLUG_CPU=n
>
> trigger
>
> kernel/time/tick-broadcast.c:39:13: warning: ‘tick_broadcast_oneshot_offline’ \
> declared ‘static’ but never defined [-Wunused-function]
>
> due to that function's definition missing.
>
> Move the CONFIG_HOTPLUG_CPU ifdeffery around its declaration too.
>
> Fixes: 1b72d4323798 ("tick: Remove outgoing CPU from broadcast masks")
> Signed-off-by: Borislav Petkov <bp@...e.de>
> Acked-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: Valentin Schneider <valentin.schneider@....com>
> Cc: Frederic Weisbecker <fweisbec@...il.com>
> Cc: x86@...nel.org
Reviewed-by: Mukesh Ojha <mojha@...eaurora.org>
Cheers,
-Mukesh
> ---
> kernel/time/tick-broadcast.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
> index 0283523de045..7541cbca695e 100644
> --- a/kernel/time/tick-broadcast.c
> +++ b/kernel/time/tick-broadcast.c
> @@ -36,12 +36,16 @@ static __cacheline_aligned_in_smp DEFINE_RAW_SPINLOCK(tick_broadcast_lock);
> static void tick_broadcast_setup_oneshot(struct clock_event_device *bc);
> static void tick_broadcast_clear_oneshot(int cpu);
> static void tick_resume_broadcast_oneshot(struct clock_event_device *bc);
> +# ifdef CONFIG_HOTPLUG_CPU
> static void tick_broadcast_oneshot_offline(unsigned int cpu);
> +# endif
> #else
> static inline void tick_broadcast_setup_oneshot(struct clock_event_device *bc) { BUG(); }
> static inline void tick_broadcast_clear_oneshot(int cpu) { }
> static inline void tick_resume_broadcast_oneshot(struct clock_event_device *bc) { }
> +# ifdef CONFIG_HOTPLUG_CPU
> static inline void tick_broadcast_oneshot_offline(unsigned int cpu) { }
> +# endif
> #endif
>
> /*
Powered by blists - more mailing lists