stop_machine: Make stop_cpus static
PATCH 1/1 stop_machine: Make stop_cpus static
The function stop_cpus() is only used internally by the stop_machine for stop multiple cpus.
Make it static.
Signed-off-by Yangtao Li <[email protected]>
--- include/linux/stop_machine.h | 9 --------- kernel/stop_machine.c | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-)
include/linux/stop_machine.h +0 -9
@@ -32,7 +32,6 @@ int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg);int stop_two_cpus (unsigned int cpu1,unsigned int cpu2,cpu_stop_fn_t fn,void *arg);bool stop_one_cpu_nowait (unsigned int cpu,cpu_stop_fn_t fn,void *arg,struct cpu_stop_work *work_buf); -int stop_cpus (const struct cpumask *cpumask,cpu_stop_fn_t fn,void *arg);void stop_machine_park (int cpu);void stop_machine_unpark (int cpu);void stop_machine_yield (const struct cpumask *cpumask);
@@ -81,14 +80,6 @@ static inline bool stop_one_cpu_nowait(unsigned int cpu, return false; } -static inline int stop_cpus (const struct cpumask *cpumask, -cpu_stop_fn_t fn,void *arg) -{ -if (cpumask_test_cpu (raw_smp_processor_id (), cpumask)) -return stop_one_cpu (raw_smp_processor_id (), fn, arg); -return -ENOENT ; -} -#endif /* CONFIG_SMP */ /*
kernel/stop_machine.c +1 -1
@@ -442,7 +442,7 @@ static int __stop_cpus(const struct cpumask *cpumask,* @cpumask were offline; otherwise, 0 if all executions of @fn * returned 0, any non zero return value if any returned non zero. */ -int stop_cpus (const struct cpumask *cpumask,cpu_stop_fn_t fn,void *arg) +static int stop_cpus (const struct cpumask *cpumask,cpu_stop_fn_t fn,void *arg) {int ret;
Signature · 1 line
2.17.1
Quoted 4 lines · Yangtao Li
The function
stop_cpus()is only used internally by thestop_machinefor stop multiple cpus.Make it static.
Thanks!
[tip: sched/core] stop_machine: Make stop_cpus() static
In reply to Yangtao LiThe following commit has been merged into the sched/core branch of tip:
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 35f4cd96f5551dc1b2641159e7bb7bf91de6600f Gitweb: https://git.kernel.org/tip/35f4cd96f5551dc1b2641159e7bb7bf91de6600f Author: Yangtao Li <[email protected]> AuthorDate: Sat, 28 Dec 2019 16:19:12 Committer: Peter Zijlstra <[email protected]> CommitterDate: Fri, 17 Jan 2020 10:19:21 +01:00
stop_machine: Make stop_cpus() static
The function stop_cpus() is only used internally by the stop_machine for stop multiple cpus.
Make it static.
Signed-off-by Yangtao Li <[email protected]>
Signed-off-by Peter Zijlstra (Intel) <[email protected]>
--- include/linux/stop_machine.h | 9 --------- kernel/stop_machine.c | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-)
include/linux/stop_machine.h +0 -9
@@ -32,7 +32,6 @@ int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg);int stop_two_cpus (unsigned int cpu1,unsigned int cpu2,cpu_stop_fn_t fn,void *arg);bool stop_one_cpu_nowait (unsigned int cpu,cpu_stop_fn_t fn,void *arg,struct cpu_stop_work *work_buf); -int stop_cpus (const struct cpumask *cpumask,cpu_stop_fn_t fn,void *arg);void stop_machine_park (int cpu);void stop_machine_unpark (int cpu);void stop_machine_yield (const struct cpumask *cpumask);
@@ -81,14 +80,6 @@ static inline bool stop_one_cpu_nowait(unsigned int cpu, return false; } -static inline int stop_cpus (const struct cpumask *cpumask, -cpu_stop_fn_t fn,void *arg) -{ -if (cpumask_test_cpu (raw_smp_processor_id (), cpumask)) -return stop_one_cpu (raw_smp_processor_id (), fn, arg); -return -ENOENT ; -} -#endif /* CONFIG_SMP */ /*
kernel/stop_machine.c +1 -1
@@ -442,7 +442,7 @@ static int __stop_cpus(const struct cpumask *cpumask,* @cpumask were offline; otherwise, 0 if all executions of @fn * returned 0, any non zero return value if any returned non zero. */ -int stop_cpus (const struct cpumask *cpumask,cpu_stop_fn_t fn,void *arg) +static int stop_cpus (const struct cpumask *cpumask,cpu_stop_fn_t fn,void *arg) {int ret;