mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
cpu/hotplug: Fix unused function warning
The cpuhp_is_ap_state() function is no longer called outside of the
CONFIG_SMP #ifdef section, causing a harmless warning:
kernel/cpu.c:129:13: error: 'cpuhp_is_ap_state' defined but not used [-Werror=unused-function]
This moves the function into the #ifdef to get a clean build again.
Fixes: 17a2f1ced0
("cpu/hotplug: Merge cpuhp_bp_states and cpuhp_ap_states")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Link: https://lkml.kernel.org/r/20180315153829.3819606-1-arnd@arndb.de
This commit is contained in:
parent
17a2f1ced0
commit
fcb3029a8d
1 changed files with 9 additions and 9 deletions
18
kernel/cpu.c
18
kernel/cpu.c
|
@ -126,15 +126,6 @@ struct cpuhp_step {
|
||||||
static DEFINE_MUTEX(cpuhp_state_mutex);
|
static DEFINE_MUTEX(cpuhp_state_mutex);
|
||||||
static struct cpuhp_step cpuhp_hp_states[];
|
static struct cpuhp_step cpuhp_hp_states[];
|
||||||
|
|
||||||
static bool cpuhp_is_ap_state(enum cpuhp_state state)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* The extra check for CPUHP_TEARDOWN_CPU is only for documentation
|
|
||||||
* purposes as that state is handled explicitly in cpu_down.
|
|
||||||
*/
|
|
||||||
return state > CPUHP_BRINGUP_CPU && state != CPUHP_TEARDOWN_CPU;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct cpuhp_step *cpuhp_get_step(enum cpuhp_state state)
|
static struct cpuhp_step *cpuhp_get_step(enum cpuhp_state state)
|
||||||
{
|
{
|
||||||
return cpuhp_hp_states + state;
|
return cpuhp_hp_states + state;
|
||||||
|
@ -235,6 +226,15 @@ err:
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
|
static bool cpuhp_is_ap_state(enum cpuhp_state state)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* The extra check for CPUHP_TEARDOWN_CPU is only for documentation
|
||||||
|
* purposes as that state is handled explicitly in cpu_down.
|
||||||
|
*/
|
||||||
|
return state > CPUHP_BRINGUP_CPU && state != CPUHP_TEARDOWN_CPU;
|
||||||
|
}
|
||||||
|
|
||||||
static inline void wait_for_ap_thread(struct cpuhp_cpu_state *st, bool bringup)
|
static inline void wait_for_ap_thread(struct cpuhp_cpu_state *st, bool bringup)
|
||||||
{
|
{
|
||||||
struct completion *done = bringup ? &st->done_up : &st->done_down;
|
struct completion *done = bringup ? &st->done_up : &st->done_down;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue