All of lore.kernel.org
 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; 5+ 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] 5+ 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; 5+ 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] 5+ 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; 5+ 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] 5+ messages in thread

* Re: [PATCH] kernel/cpu: fix spelling mistake of cpuhp_thread_run()
@ 2021-08-29 12:59 ` kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-08-29 12:59 UTC (permalink / raw)
  Cc: kbuild-all, llvm

[-- Attachment #1: Type: text/plain, Size: 2368 bytes --]

In-Reply-To: <20210824070707.5731-1-kernelfans@gmail.com>
References: <20210824070707.5731-1-kernelfans@gmail.com>
TO: Pingfan Liu <kernelfans@gmail.com>
TO: linux-kernel@vger.kernel.org
CC: 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>

Hi Pingfan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.14-rc7 next-20210827]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Pingfan-Liu/kernel-cpu-fix-spelling-mistake-of-cpuhp_thread_run/20210824-150937
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 349a2d52ffe59b7a0c5876fa7ee9f3eaf188b830
config: x86_64-randconfig-a001-20210829 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 4e1a164d7bd53653f79decc121afe784d2fde0a7)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/7747d6cc290a47c8a1b767a9e213b60a04902572
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Pingfan-Liu/kernel-cpu-fix-spelling-mistake-of-cpuhp_thread_run/20210824-150937
        git checkout 7747d6cc290a47c8a1b767a9e213b60a04902572
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> kernel/cpu.o: warning: objtool: cpuhp_thread_run()+0x19b: unreachable instruction

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36836 bytes --]

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

* Re: [PATCH] kernel/cpu: fix spelling mistake of cpuhp_thread_run()
@ 2021-08-29 12:59 ` kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-08-29 12:59 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2420 bytes --]

In-Reply-To: <20210824070707.5731-1-kernelfans@gmail.com>
References: <20210824070707.5731-1-kernelfans@gmail.com>
TO: Pingfan Liu <kernelfans@gmail.com>
TO: linux-kernel(a)vger.kernel.org
CC: 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>

Hi Pingfan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.14-rc7 next-20210827]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Pingfan-Liu/kernel-cpu-fix-spelling-mistake-of-cpuhp_thread_run/20210824-150937
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 349a2d52ffe59b7a0c5876fa7ee9f3eaf188b830
config: x86_64-randconfig-a001-20210829 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 4e1a164d7bd53653f79decc121afe784d2fde0a7)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/7747d6cc290a47c8a1b767a9e213b60a04902572
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Pingfan-Liu/kernel-cpu-fix-spelling-mistake-of-cpuhp_thread_run/20210824-150937
        git checkout 7747d6cc290a47c8a1b767a9e213b60a04902572
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> kernel/cpu.o: warning: objtool: cpuhp_thread_run()+0x19b: unreachable instruction

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36836 bytes --]

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

end of thread, other threads:[~2021-08-29 13:00 UTC | newest]

Thread overview: 5+ 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
2021-08-29 12:59 kernel test robot
2021-08-29 12:59 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.