linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] kernel/smp: Use smp_call_func_t in on_each_cpu()
@ 2020-04-17 16:24 Kaitao Cheng
  2020-04-17 17:05 ` Sebastian Andrzej Siewior
  2020-04-19 15:55 ` [tip: smp/core] smp: " tip-bot2 for Kaitao Cheng
  0 siblings, 2 replies; 4+ messages in thread
From: Kaitao Cheng @ 2020-04-17 16:24 UTC (permalink / raw)
  To: tglx, peterz, bigeasy, namit, linux-kernel; +Cc: songmuchun, Kaitao Cheng

There is already a typedef smp_call_func_t, so we can just use it,
maybe better.

Fixes: 3a5f65df5a0fc ("Typedef SMP call function pointer")
Signed-off-by: Kaitao Cheng <pilgrimtao@gmail.com>
---
 kernel/smp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/smp.c b/kernel/smp.c
index 786092aabdcd..84303197caf9 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -620,7 +620,7 @@ void __init smp_init(void)
  * early_boot_irqs_disabled is set.  Use local_irq_save/restore() instead
  * of local_irq_disable/enable().
  */
-void on_each_cpu(void (*func) (void *info), void *info, int wait)
+void on_each_cpu(smp_call_func_t func, void *info, int wait)
 {
 	unsigned long flags;
 
-- 
2.20.1


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

* Re: [PATCH RESEND] kernel/smp: Use smp_call_func_t in on_each_cpu()
  2020-04-17 16:24 [PATCH RESEND] kernel/smp: Use smp_call_func_t in on_each_cpu() Kaitao Cheng
@ 2020-04-17 17:05 ` Sebastian Andrzej Siewior
  2020-04-19  3:21   ` Tao pilgrim
  2020-04-19 15:55 ` [tip: smp/core] smp: " tip-bot2 for Kaitao Cheng
  1 sibling, 1 reply; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2020-04-17 17:05 UTC (permalink / raw)
  To: Kaitao Cheng; +Cc: tglx, peterz, namit, linux-kernel, songmuchun

On 2020-04-18 00:24:51 [+0800], Kaitao Cheng wrote:
> There is already a typedef smp_call_func_t, so we can just use it,
> maybe better.
> 
> Fixes: 3a5f65df5a0fc ("Typedef SMP call function pointer")
> Signed-off-by: Kaitao Cheng <pilgrimtao@gmail.com>

I would not go as far as the Fixes: tag but otherwise:

  Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

> ---
>  kernel/smp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/smp.c b/kernel/smp.c
> index 786092aabdcd..84303197caf9 100644
> --- a/kernel/smp.c
> +++ b/kernel/smp.c
> @@ -620,7 +620,7 @@ void __init smp_init(void)
>   * early_boot_irqs_disabled is set.  Use local_irq_save/restore() instead
>   * of local_irq_disable/enable().
>   */
> -void on_each_cpu(void (*func) (void *info), void *info, int wait)
> +void on_each_cpu(smp_call_func_t func, void *info, int wait)
>  {
>  	unsigned long flags;
>  

Sebastian

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

* Re: [PATCH RESEND] kernel/smp: Use smp_call_func_t in on_each_cpu()
  2020-04-17 17:05 ` Sebastian Andrzej Siewior
@ 2020-04-19  3:21   ` Tao pilgrim
  0 siblings, 0 replies; 4+ messages in thread
From: Tao pilgrim @ 2020-04-19  3:21 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior; +Cc: tglx, peterz, namit, linux-kernel, songmuchun

On Sat, Apr 18, 2020 at 1:05 AM Sebastian Andrzej Siewior
<bigeasy@linutronix.de> wrote:
>
> On 2020-04-18 00:24:51 [+0800], Kaitao Cheng wrote:
> > There is already a typedef smp_call_func_t, so we can just use it,
> > maybe better.
> >
> > Fixes: 3a5f65df5a0fc ("Typedef SMP call function pointer")
> > Signed-off-by: Kaitao Cheng <pilgrimtao@gmail.com>
>
> I would not go as far as the Fixes: tag but otherwise:
>
>   Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Thanks for your review. Do you mean I should delete the Fixes tag?

>
> > ---
> >  kernel/smp.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/kernel/smp.c b/kernel/smp.c
> > index 786092aabdcd..84303197caf9 100644
> > --- a/kernel/smp.c
> > +++ b/kernel/smp.c
> > @@ -620,7 +620,7 @@ void __init smp_init(void)
> >   * early_boot_irqs_disabled is set.  Use local_irq_save/restore() instead
> >   * of local_irq_disable/enable().
> >   */
> > -void on_each_cpu(void (*func) (void *info), void *info, int wait)
> > +void on_each_cpu(smp_call_func_t func, void *info, int wait)
> >  {
> >       unsigned long flags;
> >
>
> Sebastian

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

* [tip: smp/core] smp: Use smp_call_func_t in on_each_cpu()
  2020-04-17 16:24 [PATCH RESEND] kernel/smp: Use smp_call_func_t in on_each_cpu() Kaitao Cheng
  2020-04-17 17:05 ` Sebastian Andrzej Siewior
@ 2020-04-19 15:55 ` tip-bot2 for Kaitao Cheng
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot2 for Kaitao Cheng @ 2020-04-19 15:55 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Kaitao Cheng, Thomas Gleixner, Sebastian Andrzej Siewior, x86, LKML

The following commit has been merged into the smp/core branch of tip:

Commit-ID:     58eb7b77ad01f058e523554cb7bae7272a7d2579
Gitweb:        https://git.kernel.org/tip/58eb7b77ad01f058e523554cb7bae7272a7d2579
Author:        Kaitao Cheng <pilgrimtao@gmail.com>
AuthorDate:    Sat, 18 Apr 2020 00:24:51 +08:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Sun, 19 Apr 2020 17:51:48 +02:00

smp: Use smp_call_func_t in on_each_cpu()

Use smp_call_func_t instead of the open coded function pointer argument.

Signed-off-by: Kaitao Cheng <pilgrimtao@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lkml.kernel.org/r/20200417162451.91969-1-pilgrimtao@gmail.com

---
 kernel/smp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/smp.c b/kernel/smp.c
index 786092a..8430319 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -620,7 +620,7 @@ void __init smp_init(void)
  * early_boot_irqs_disabled is set.  Use local_irq_save/restore() instead
  * of local_irq_disable/enable().
  */
-void on_each_cpu(void (*func) (void *info), void *info, int wait)
+void on_each_cpu(smp_call_func_t func, void *info, int wait)
 {
 	unsigned long flags;
 

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

end of thread, other threads:[~2020-04-19 15:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17 16:24 [PATCH RESEND] kernel/smp: Use smp_call_func_t in on_each_cpu() Kaitao Cheng
2020-04-17 17:05 ` Sebastian Andrzej Siewior
2020-04-19  3:21   ` Tao pilgrim
2020-04-19 15:55 ` [tip: smp/core] smp: " tip-bot2 for Kaitao Cheng

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