Skip to contentSkip to conversation

smp: Fix up and expand the smp_call_function_many() kerneldoc

PATCH Applied Rafael J. Wysocki 3 participants 7 messages Sep 9, 2025 – Sep 18, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 smp: Fix up and expand the smp_call_function_many() kerneldoc

From: Rafael J. Wysocki <[email protected]>

The smp_call_function_many() kerneldoc comment got out of sync with the function definition (bool parameter "wait" is incorrectly described as a bitmask in it), so fix it up by copying the "wait" description from the smp_call_function() kerneldoc and add information regarding the handling of the local CPU to it.

Fixes 49b3bd213a9f ("smp: Fix all kernel-doc warnings")
---
 kernel/smp.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
kernel/smp.c +5 -6
@@ -884,16 +884,15 @@ static void smp_call_function_many_cond(
  * @mask: The set of cpus to run on (only runs on online subset).
  * @func: The function to run. This must be fast and non-blocking.
  * @info: An arbitrary pointer to pass to the function.
- * @wait: 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.
- *
- * If @wait is true, then returns once @func has returned.
+ * @wait: If true, wait (atomically) until function has completed
+ *        on other CPUs.
  *
  * You must not call this function with disabled interrupts or from a
  * hardware interrupt handler or from a bottom half handler. Preemption
  * must be disabled when calling this function.
+ *
+ * @func is not called on the local CPU even if @mask contains it.  Consider
+ * using on_each_cpu_cond_mask() instead if this is not desirable.
  */
 void smp_call_function_many(const struct cpumask *mask,
 			    smp_call_func_t func, void *info, bool wait)
#1 lore raw
Quoted 11 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

The smp_call_function_many() kerneldoc comment got out of sync with the function definition (bool parameter "wait" is incorrectly described as a bitmask in it), so fix it up by copying the "wait" description from the smp_call_function() kerneldoc and add information regarding the handling of the local CPU to it.

Fixes 49b3bd213a9f ("smp: Fix all kernel-doc warnings")

It's been a week and no feedback.

Well, in the further absence of any, I'll assume no concerns and just queue this up.

Quoted 32 lines
---
 kernel/smp.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
kernel/smp.c +5 -6
@@ -884,16 +884,15 @@ static void smp_call_function_many_cond(
  * @mask: The set of cpus to run on (only runs on online subset).
  * @func: The function to run. This must be fast and non-blocking.
  * @info: An arbitrary pointer to pass to the function.
- * @wait: 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.
- *
- * If @wait is true, then returns once @func has returned.
+ * @wait: If true, wait (atomically) until function has completed
+ *        on other CPUs.
  *
  * You must not call this function with disabled interrupts or from a
  * hardware interrupt handler or from a bottom half handler. Preemption
  * must be disabled when calling this function.
+ *
+ * @func is not called on the local CPU even if @mask contains it.  Consider
+ * using on_each_cpu_cond_mask() instead if this is not desirable.
  */
 void smp_call_function_many(const struct cpumask *mask,
                            smp_call_func_t func, void *info, bool wait)
#2 lore raw
Quoted 10 lines · Rafael J. Wysocki
Quoted 9 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

The smp_call_function_many() kerneldoc comment got out of sync with the function definition (bool parameter "wait" is incorrectly described as a bitmask in it), so fix it up by copying the "wait" description from the smp_call_function() kerneldoc and add information regarding the handling of the local CPU to it.

Quoted 7 lines
Quoted 2 lines
Fixes 49b3bd213a9f ("smp: Fix all kernel-doc warnings")

It's been a week and no feedback.

Well, in the further absence of any, I'll assume no concerns and just queue this up.

Sorry, was distracted. No objections from my side. Did you queue it already?

#3 lore raw
Quoted 16 lines · Thomas Gleixner
Quoted 13 lines · Rafael J. Wysocki
Quoted 11 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

The smp_call_function_many() kerneldoc comment got out of sync with the function definition (bool parameter "wait" is incorrectly described as a bitmask in it), so fix it up by copying the "wait" description from the smp_call_function() kerneldoc and add information regarding the handling of the local CPU to it.

Fixes 49b3bd213a9f ("smp: Fix all kernel-doc warnings")
Quoted 7 lines
Quoted 4 lines

It's been a week and no feedback.

Well, in the further absence of any, I'll assume no concerns and just queue this up.

Sorry, was distracted. No objections from my side. Did you queue it already?

No, I didn't.

#4 lore raw
Quoted 19 lines · Rafael J. Wysocki
Quoted 18 lines · Thomas Gleixner
Quoted 15 lines · Rafael J. Wysocki
Quoted 11 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

The smp_call_function_many() kerneldoc comment got out of sync with the function definition (bool parameter "wait" is incorrectly described as a bitmask in it), so fix it up by copying the "wait" description from the smp_call_function() kerneldoc and add information regarding the handling of the local CPU to it.

Fixes 49b3bd213a9f ("smp: Fix all kernel-doc warnings")

It's been a week and no feedback.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Well, in the further absence of any, I'll assume no concerns and just queue this up.

Sorry, was distracted. No objections from my side. Did you queue it already?

No, I didn't.

I pick it up

#5 lore raw
Quoted 24 lines · Thomas Gleixner
Quoted 22 lines · Rafael J. Wysocki
Quoted 21 lines · Thomas Gleixner
Quoted 17 lines · Rafael J. Wysocki
Quoted 11 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

The smp_call_function_many() kerneldoc comment got out of sync with the function definition (bool parameter "wait" is incorrectly described as a bitmask in it), so fix it up by copying the "wait" description from the smp_call_function() kerneldoc and add information regarding the handling of the local CPU to it.

Fixes 49b3bd213a9f ("smp: Fix all kernel-doc warnings")

It's been a week and no feedback.

Well, in the further absence of any, I'll assume no concerns and just queue this up.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Sorry, was distracted. No objections from my side. Did you queue it already?

No, I didn't.

I pick it up

Thanks!

#6 lore raw
In reply to Rafael J. Wysocki
The following commit has been merged into the smp/core branch of tip:

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

Commit-ID:     ccf09357ffef2ab472369ab9cdf470c9bc9b821a
Gitweb:        https://git.kernel.org/tip/ccf09357ffef2ab472369ab9cdf470c9bc9b821a
Author:        Rafael J. Wysocki <[email protected]>
AuthorDate:    Tue, 09 Sep 2025 13:44:14 +02:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Thu, 18 Sep 2025 22:21:28 +02:00

smp: Fix up and expand the smp_call_function_many() kerneldoc

The smp_call_function_many() kerneldoc comment got out of sync with the function definition (bool parameter "wait" is incorrectly described as a bitmask in it), so fix it up by copying the "wait" description from the smp_call_function() kerneldoc and add information regarding the handling of the local CPU to it.

Fixes 49b3bd213a9f ("smp: Fix all kernel-doc warnings")
---
 kernel/smp.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
kernel/smp.c +5 -6
index 56f83aa..02f5229 100644
@@ -884,16 +884,15 @@ static void smp_call_function_many_cond(const struct cpumask *mask,
  * @mask: The set of cpus to run on (only runs on online subset).
  * @func: The function to run. This must be fast and non-blocking.
  * @info: An arbitrary pointer to pass to the function.
- * @wait: 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.
- *
- * If @wait is true, then returns once @func has returned.
+ * @wait: If true, wait (atomically) until function has completed
+ *        on other CPUs.
  *
  * You must not call this function with disabled interrupts or from a
  * hardware interrupt handler or from a bottom half handler. Preemption
  * must be disabled when calling this function.
+ *
+ * @func is not called on the local CPU even if @mask contains it.  Consider
+ * using on_each_cpu_cond_mask() instead if this is not desirable.
  */
 void smp_call_function_many(const struct cpumask *mask,
 			    smp_call_func_t func, void *info, bool wait)