Skip to contentSkip to conversation

tick/broadcast: Fix warning about undefined tick_broadcast_oneshot_offline()

PATCH In review Borislav Petkov 3 participants 3 messages Mar 29, 2019 Nohz, dynticks support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tick/broadcast: Fix warning about undefined tick_broadcast_oneshot_offline()

From: Borislav Petkov <[email protected]>

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")
Cc Valentin Schneider <[email protected]>
Cc Frederic Weisbecker <[email protected]>
---
 kernel/time/tick-broadcast.c | 4 ++++
 1 file changed, 4 insertions(+)
kernel/time/tick-broadcast.c +4 -0
index 0283523de045..7541cbca695e 100644
@@ -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
 
 /*
Signature · 1 line
2.21.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Borislav Petkov

From: Borislav Petkov <[email protected]>

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.

Quoted 8 lines

Move the CONFIG_HOTPLUG_CPU ifdeffery around its declaration too.

Fixes 1b72d4323798 ("tick: Remove outgoing CPU from broadcast masks")
Cc Valentin Schneider <[email protected]>
Cc Frederic Weisbecker <[email protected]>

Cheers,
-Mukesh

Quoted 25 lines
---
  kernel/time/tick-broadcast.c | 4 ++++
  1 file changed, 4 insertions(+)
kernel/time/tick-broadcast.c +4 -0
index 0283523de045..7541cbca695e 100644
@@ -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 lore raw
In reply to Borislav Petkov
tick/broadcast: Fix warning about undefined tick_broadcast_oneshot_offline()
Commit-ID:  aba0954327c831f593702e3a81ef3ad4bec7a838
Gitweb:     https://git.kernel.org/tip/aba0954327c831f593702e3a81ef3ad4bec7a838
Author:     Borislav Petkov <[email protected]>
AuthorDate: Fri, 29 Mar 2019 11:28:52 +0100
Committer:  Borislav Petkov <[email protected]>
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")
Cc Valentin Schneider <[email protected]>
Cc Frederic Weisbecker <[email protected]>
---
 kernel/time/tick-broadcast.c | 4 ++++
 1 file changed, 4 insertions(+)
kernel/time/tick-broadcast.c +4 -0
index 0283523de045..7541cbca695e 100644
@@ -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
 
 /*