Skip to contentSkip to conversation

kernel/cpu: fix spelling mistake of cpuhp_thread_run()

PATCH In review Pingfan Liu 2 participants 3 messages Aug 24, 2021 – Aug 25, 2021 CPU hotplug

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel/cpu: fix spelling mistake of cpuhp_thread_run()

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

Cc Peter Zijlstra <[email protected]>
Cc Vincent Donnefort <[email protected]>
Cc Valentin Schneider <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Yuan ZhaoXiong <[email protected]>

To: [email protected]

---
 kernel/cpu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/cpu.c +3 -3
index 804b847912dc..581d08c0efb6 100644
@@ -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,
 };
Signature · 1 line
2.29.2
#1 lore raw

Hello Pingfan,

Quoted 2 lines · Pingfan Liu

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

Quoted 48 lines
Cc Peter Zijlstra <[email protected]>
Cc Vincent Donnefort <[email protected]>
Cc Valentin Schneider <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Yuan ZhaoXiong <[email protected]>

To: [email protected]

---
 kernel/cpu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/cpu.c +3 -3
index 804b847912dc..581d08c0efb6 100644
@@ -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,
 };
Signature · 1 line
2.29.2
#2 lore raw
Quoted 12 lines · Gautham R Shenoy

Hello Pingfan,

Quoted 2 lines · Pingfan Liu

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