linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tick/broadcast: Fix warning about undefined tick_broadcast_oneshot_offline()
@ 2019-03-29 11:05 Borislav Petkov
  2019-03-29 12:44 ` Mukesh Ojha
  2019-03-29 13:19 ` [tip:timers/core] " tip-bot for Borislav Petkov
  0 siblings, 2 replies; 3+ messages in thread
From: Borislav Petkov @ 2019-03-29 11:05 UTC (permalink / raw)
  To: LKML; +Cc: Thomas Gleixner, Valentin Schneider, Frederic Weisbecker, x86

From: Borislav Petkov <bp@suse.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@suse.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Valentin Schneider <valentin.schneider@arm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: x86@kernel.org
---
 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
 
 /*
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tick/broadcast: Fix warning about undefined tick_broadcast_oneshot_offline()
  2019-03-29 11:05 [PATCH] tick/broadcast: Fix warning about undefined tick_broadcast_oneshot_offline() Borislav Petkov
@ 2019-03-29 12:44 ` Mukesh Ojha
  2019-03-29 13:19 ` [tip:timers/core] " tip-bot for Borislav Petkov
  1 sibling, 0 replies; 3+ messages in thread
From: Mukesh Ojha @ 2019-03-29 12:44 UTC (permalink / raw)
  To: Borislav Petkov, LKML
  Cc: Thomas Gleixner, Valentin Schneider, Frederic Weisbecker, x86


On 3/29/2019 4:35 PM, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.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@suse.de>
> Acked-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Valentin Schneider <valentin.schneider@arm.com>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: x86@kernel.org


Reviewed-by: Mukesh Ojha <mojha@codeaurora.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
>   
>   /*

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:timers/core] tick/broadcast: Fix warning about undefined tick_broadcast_oneshot_offline()
  2019-03-29 11:05 [PATCH] tick/broadcast: Fix warning about undefined tick_broadcast_oneshot_offline() Borislav Petkov
  2019-03-29 12:44 ` Mukesh Ojha
@ 2019-03-29 13:19 ` tip-bot for Borislav Petkov
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Borislav Petkov @ 2019-03-29 13:19 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, fweisbec, bp, tglx, mingo, valentin.schneider, mojha, hpa

Commit-ID:  aba0954327c831f593702e3a81ef3ad4bec7a838
Gitweb:     https://git.kernel.org/tip/aba0954327c831f593702e3a81ef3ad4bec7a838
Author:     Borislav Petkov <bp@suse.de>
AuthorDate: Fri, 29 Mar 2019 11:28:52 +0100
Committer:  Borislav Petkov <bp@suse.de>
CommitDate: Fri, 29 Mar 2019 14:13:44 +0100

tick/broadcast: Fix warning about undefined tick_broadcast_oneshot_offline()

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@suse.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Cc: Valentin Schneider <valentin.schneider@arm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/20190329110508.6621-1-bp@alien8.de
---
 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
 
 /*

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-29 13:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-29 11:05 [PATCH] tick/broadcast: Fix warning about undefined tick_broadcast_oneshot_offline() Borislav Petkov
2019-03-29 12:44 ` Mukesh Ojha
2019-03-29 13:19 ` [tip:timers/core] " tip-bot for Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).