linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kernel/cpu: fix spelling mistake of cpuhp_thread_run()
@ 2021-08-24  7:07 Pingfan Liu
  2021-08-25  6:50 ` Gautham R Shenoy
  0 siblings, 1 reply; 3+ messages in thread
From: Pingfan Liu @ 2021-08-24  7:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Pingfan Liu, Peter Zijlstra, Vincent Donnefort,
	Valentin Schneider, Ingo Molnar, Thomas Gleixner,
	Nicholas Piggin, Yuan ZhaoXiong

According to the name of cpuhp_should_run(), cpuhp_thread_fun() should
be a spelling mistake.

Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Vincent Donnefort <vincent.donnefort@arm.com>
Cc: Valentin Schneider <valentin.schneider@arm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Yuan ZhaoXiong <yuanzhaoxiong@baidu.com>
To: linux-kernel@vger.kernel.org
---
 kernel/cpu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 804b847912dc..581d08c0efb6 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -521,7 +521,7 @@ static void __cpuhp_kick_ap(struct cpuhp_cpu_state *st)
 	st->result = 0;
 	/*
 	 * Make sure the above stores are visible before should_run becomes
-	 * true. Paired with the mb() above in cpuhp_thread_fun()
+	 * true. Paired with the mb() above in cpuhp_thread_run()
 	 */
 	smp_mb();
 	st->should_run = true;
@@ -723,7 +723,7 @@ static int cpuhp_should_run(unsigned int cpu)
  *
  * When complete or on error, should_run is cleared and the completion is fired.
  */
-static void cpuhp_thread_fun(unsigned int cpu)
+static void cpuhp_thread_run(unsigned int cpu)
 {
 	struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
 	bool bringup = st->bringup;
@@ -863,7 +863,7 @@ static struct smp_hotplug_thread cpuhp_threads = {
 	.store			= &cpuhp_state.thread,
 	.create			= &cpuhp_create,
 	.thread_should_run	= cpuhp_should_run,
-	.thread_fn		= cpuhp_thread_fun,
+	.thread_fn		= cpuhp_thread_run,
 	.thread_comm		= "cpuhp/%u",
 	.selfparking		= true,
 };
-- 
2.29.2


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

* Re: [PATCH] kernel/cpu: fix spelling mistake of cpuhp_thread_run()
  2021-08-24  7:07 [PATCH] kernel/cpu: fix spelling mistake of cpuhp_thread_run() Pingfan Liu
@ 2021-08-25  6:50 ` Gautham R Shenoy
  2021-08-25 14:11   ` Pingfan Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Gautham R Shenoy @ 2021-08-25  6:50 UTC (permalink / raw)
  To: Pingfan Liu
  Cc: linux-kernel, Peter Zijlstra, Vincent Donnefort,
	Valentin Schneider, Ingo Molnar, Thomas Gleixner,
	Nicholas Piggin, Yuan ZhaoXiong

Hello Pingfan,

On Tue, Aug 24, 2021 at 03:07:07PM +0800, Pingfan Liu wrote:
> According to the name of cpuhp_should_run(), cpuhp_thread_fun() should
> be a spelling mistake.

I think cpuhp_thread_fun() is short for "CPU Hotplug thread
function". It seems correct since the function pointer "thread_fn"
(short for "Thread function") in the struct "smp_hotplug_thread
cpuhp_threads" is assigned the value cpuhp_thread_fun().


> 
> Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Vincent Donnefort <vincent.donnefort@arm.com>
> Cc: Valentin Schneider <valentin.schneider@arm.com>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Nicholas Piggin <npiggin@gmail.com>
> Cc: Yuan ZhaoXiong <yuanzhaoxiong@baidu.com>
> To: linux-kernel@vger.kernel.org
> ---
>  kernel/cpu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/cpu.c b/kernel/cpu.c
> index 804b847912dc..581d08c0efb6 100644
> --- a/kernel/cpu.c
> +++ b/kernel/cpu.c
> @@ -521,7 +521,7 @@ static void __cpuhp_kick_ap(struct cpuhp_cpu_state *st)
>  	st->result = 0;
>  	/*
>  	 * Make sure the above stores are visible before should_run becomes
> -	 * true. Paired with the mb() above in cpuhp_thread_fun()
> +	 * true. Paired with the mb() above in cpuhp_thread_run()
>  	 */
>  	smp_mb();
>  	st->should_run = true;
> @@ -723,7 +723,7 @@ static int cpuhp_should_run(unsigned int cpu)
>   *
>   * When complete or on error, should_run is cleared and the completion is fired.
>   */
> -static void cpuhp_thread_fun(unsigned int cpu)
> +static void cpuhp_thread_run(unsigned int cpu)
>  {
>  	struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
>  	bool bringup = st->bringup;
> @@ -863,7 +863,7 @@ static struct smp_hotplug_thread cpuhp_threads = {
>  	.store			= &cpuhp_state.thread,
>  	.create			= &cpuhp_create,
>  	.thread_should_run	= cpuhp_should_run,
> -	.thread_fn		= cpuhp_thread_fun,
> +	.thread_fn		= cpuhp_thread_run,
>  	.thread_comm		= "cpuhp/%u",
>  	.selfparking		= true,
>  };
> -- 
> 2.29.2
> 

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

* Re: [PATCH] kernel/cpu: fix spelling mistake of cpuhp_thread_run()
  2021-08-25  6:50 ` Gautham R Shenoy
@ 2021-08-25 14:11   ` Pingfan Liu
  0 siblings, 0 replies; 3+ messages in thread
From: Pingfan Liu @ 2021-08-25 14:11 UTC (permalink / raw)
  To: ego
  Cc: LKML, Peter Zijlstra, Vincent Donnefort, Valentin Schneider,
	Ingo Molnar, Thomas Gleixner, Nicholas Piggin, Yuan ZhaoXiong

On Wed, Aug 25, 2021 at 2:50 PM Gautham R Shenoy <ego@linux.vnet.ibm.com> wrote:
>
> Hello Pingfan,
>
> On Tue, Aug 24, 2021 at 03:07:07PM +0800, Pingfan Liu wrote:
> > According to the name of cpuhp_should_run(), cpuhp_thread_fun() should
> > be a spelling mistake.
>
> I think cpuhp_thread_fun() is short for "CPU Hotplug thread
> function". It seems correct since the function pointer "thread_fn"
> (short for "Thread function") in the struct "smp_hotplug_thread
> cpuhp_threads" is assigned the value cpuhp_thread_fun().
>
This makes sense to me.

Thank you very much.

Regards,
Pingfan

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

end of thread, other threads:[~2021-08-25 14:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24  7:07 [PATCH] kernel/cpu: fix spelling mistake of cpuhp_thread_run() Pingfan Liu
2021-08-25  6:50 ` Gautham R Shenoy
2021-08-25 14:11   ` Pingfan Liu

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).