lkml.org 
[lkml]   [2021]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] smp: Fix the comments of smp_call_function_many()
From
Date
On 12/12/21 7:57 PM, Zhen Lei wrote:
> diff --git a/kernel/smp.c b/kernel/smp.c
> index 01a7c1706a58b1d..6ec884f41b7506d 100644
> --- a/kernel/smp.c
> +++ b/kernel/smp.c
> @@ -861,6 +861,13 @@ EXPORT_SYMBOL_GPL(smp_call_function_any);
> #define SCF_WAIT (1U << 0)
> #define SCF_RUN_LOCAL (1U << 1)
>
> +/**
> + * smp_call_function_many_cond(): Run a function on a set of CPUs.
> + * @scf_flags: Bitmask that controls the operation. If %SCF_WAIT is set,
> + * wait (atomically) until function has completed on other CPUs. If
> + * %SCF_RUN_LOCAL is set, the function will also be run locally
> + * if the local CPU is set in the @cpumask.
> + */

Fixing up the smp_call_function_many() comment is a good idea. But, the
new smp_call_function_many_cond() comment duplicates these which are
_just_ above it:

> /*
> * Flags to be used as scf_flags argument of smp_call_function_many_cond().
> *
> * %SCF_WAIT: Wait until function execution is completed
> * %SCF_RUN_LOCAL: Run also locally if local cpu is set in cpumask
> */
> #define SCF_WAIT (1U << 0)
> #define SCF_RUN_LOCAL (1U << 1)

Could we comment the bits in one place?

\
 
 \ /
  Last update: 2021-12-13 19:09    [W:0.117 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site