linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] stop_machine: Make stop_cpus static
@ 2019-12-28 16:19 Yangtao Li
  2020-01-06 14:56 ` Peter Zijlstra
  2020-01-17 10:08 ` [tip: sched/core] stop_machine: Make stop_cpus() static tip-bot2 for Yangtao Li
  0 siblings, 2 replies; 3+ messages in thread
From: Yangtao Li @ 2019-12-28 16:19 UTC (permalink / raw)
  To: tiny.windzz, peterz, tglx, heiko.carstens, mark.rutland, paulmck,
	schwidefsky
  Cc: linux-kernel

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>
---
 include/linux/stop_machine.h | 9 ---------
 kernel/stop_machine.c        | 2 +-
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h
index 648298f877da..76d8b09384a7 100644
--- a/include/linux/stop_machine.h
+++ b/include/linux/stop_machine.h
@@ -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 */
 
 /*
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index 5d68ec4c4015..865bb0228ab6 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -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;
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] stop_machine: Make stop_cpus static
  2019-12-28 16:19 [PATCH] stop_machine: Make stop_cpus static Yangtao Li
@ 2020-01-06 14:56 ` Peter Zijlstra
  2020-01-17 10:08 ` [tip: sched/core] stop_machine: Make stop_cpus() static tip-bot2 for Yangtao Li
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Zijlstra @ 2020-01-06 14:56 UTC (permalink / raw)
  To: Yangtao Li
  Cc: tglx, heiko.carstens, mark.rutland, paulmck, schwidefsky, linux-kernel

On Sat, Dec 28, 2019 at 04:19:12PM +0000, Yangtao Li wrote:
> The function stop_cpus() is only used internally by the
> stop_machine for stop multiple cpus.
> 
> Make it static.

Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip: sched/core] stop_machine: Make stop_cpus() static
  2019-12-28 16:19 [PATCH] stop_machine: Make stop_cpus static Yangtao Li
  2020-01-06 14:56 ` Peter Zijlstra
@ 2020-01-17 10:08 ` tip-bot2 for Yangtao Li
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Yangtao Li @ 2020-01-17 10:08 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Yangtao Li, Peter Zijlstra (Intel), x86, LKML

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 <tiny.windzz@gmail.com>
AuthorDate:    Sat, 28 Dec 2019 16:19:12 
Committer:     Peter Zijlstra <peterz@infradead.org>
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 <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
---
 include/linux/stop_machine.h |  9 ---------
 kernel/stop_machine.c        |  2 +-
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h
index 648298f..76d8b09 100644
--- a/include/linux/stop_machine.h
+++ b/include/linux/stop_machine.h
@@ -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 */
 
 /*
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index 5d68ec4..865bb02 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -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;
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-17 10:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-28 16:19 [PATCH] stop_machine: Make stop_cpus static Yangtao Li
2020-01-06 14:56 ` Peter Zijlstra
2020-01-17 10:08 ` [tip: sched/core] stop_machine: Make stop_cpus() static tip-bot2 for Yangtao Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).