Skip to content

Commit aba0954

Browse files
committed
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: 1b72d43 ("tick: Remove outgoing CPU from broadcast masks") Signed-off-by: Borislav Petkov <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Reviewed-by: Mukesh Ojha <[email protected]> Cc: Valentin Schneider <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
1 parent 7a8e61f commit aba0954

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

kernel/time/tick-broadcast.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,16 @@ static __cacheline_aligned_in_smp DEFINE_RAW_SPINLOCK(tick_broadcast_lock);
3636
static void tick_broadcast_setup_oneshot(struct clock_event_device *bc);
3737
static void tick_broadcast_clear_oneshot(int cpu);
3838
static void tick_resume_broadcast_oneshot(struct clock_event_device *bc);
39+
# ifdef CONFIG_HOTPLUG_CPU
3940
static void tick_broadcast_oneshot_offline(unsigned int cpu);
41+
# endif
4042
#else
4143
static inline void tick_broadcast_setup_oneshot(struct clock_event_device *bc) { BUG(); }
4244
static inline void tick_broadcast_clear_oneshot(int cpu) { }
4345
static inline void tick_resume_broadcast_oneshot(struct clock_event_device *bc) { }
46+
# ifdef CONFIG_HOTPLUG_CPU
4447
static inline void tick_broadcast_oneshot_offline(unsigned int cpu) { }
48+
# endif
4549
#endif
4650

4751
/*

0 commit comments

Comments
 (0)