Skip to content

Commit 35f4cd9

Browse files
TinyWindzzPeter Zijlstra
authored andcommitted
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 <tiny.windzz@gmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20191228161912.24082-1-tiny.windzz@gmail.com
1 parent 02d4ac5 commit 35f4cd9

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

‎include/linux/stop_machine.h‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg);
3232
int stop_two_cpus(unsigned int cpu1, unsigned int cpu2, cpu_stop_fn_t fn, void *arg);
3333
bool stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fn, void *arg,
3434
struct cpu_stop_work *work_buf);
35-
int stop_cpus(const struct cpumask *cpumask, cpu_stop_fn_t fn, void *arg);
3635
void stop_machine_park(int cpu);
3736
void stop_machine_unpark(int cpu);
3837
void stop_machine_yield(const struct cpumask *cpumask);
@@ -81,14 +80,6 @@ static inline bool stop_one_cpu_nowait(unsigned int cpu,
8180
return false;
8281
}
8382

84-
static inline int stop_cpus(const struct cpumask *cpumask,
85-
cpu_stop_fn_t fn, void *arg)
86-
{
87-
if (cpumask_test_cpu(raw_smp_processor_id(), cpumask))
88-
return stop_one_cpu(raw_smp_processor_id(), fn, arg);
89-
return -ENOENT;
90-
}
91-
9283
#endif /* CONFIG_SMP */
9384

9485
/*

‎kernel/stop_machine.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ static int __stop_cpus(const struct cpumask *cpumask,
442442
* @cpumask were offline; otherwise, 0 if all executions of @fn
443443
* returned 0, any non zero return value if any returned non zero.
444444
*/
445-
int stop_cpus(const struct cpumask *cpumask, cpu_stop_fn_t fn, void *arg)
445+
static int stop_cpus(const struct cpumask *cpumask, cpu_stop_fn_t fn, void *arg)
446446
{
447447
int ret;
448448

0 commit comments

Comments
 (0)