Documentation: core-api/cpuhotplug: Fix state names
Commit Message
Dynamic allocated hotplug states in documentation and comment above
cpuhp_state enum do not match the code. To not get confused by wrong
documentation, change to proper state names.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
---
Documentation/core-api/cpu_hotplug.rst | 10 +++++-----
include/linux/cpuhotplug.h | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
Comments
On Mon, May 15 2023 at 18:20, Anna-Maria Behnsen wrote:
> Dynamic allocated hotplug states in documentation and comment above
> cpuhp_state enum do not match the code. To not get confused by wrong
> documentation, change to proper state names.
>
> Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
On Mon, 15 May 2023, Thomas Gleixner wrote:
> On Mon, May 15 2023 at 18:20, Anna-Maria Behnsen wrote:
>
> > Dynamic allocated hotplug states in documentation and comment above
> > cpuhp_state enum do not match the code. To not get confused by wrong
> > documentation, change to proper state names.
> >
> > Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
>
> Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
>
Ping?
Anna-Maria Behnsen <anna-maria@linutronix.de> writes:
> On Mon, 15 May 2023, Thomas Gleixner wrote:
>
>> On Mon, May 15 2023 at 18:20, Anna-Maria Behnsen wrote:
>>
>> > Dynamic allocated hotplug states in documentation and comment above
>> > cpuhp_state enum do not match the code. To not get confused by wrong
>> > documentation, change to proper state names.
>> >
>> > Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
>>
>> Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
>>
>
> Ping?
I didn't pick this up because linux/cpuhotplug.h is a bit outside my
turf; I can certainly do so, though, if that seems like the best path.
jon
On Mon, Aug 07 2023 at 10:44, Jonathan Corbet wrote:
> Anna-Maria Behnsen <anna-maria@linutronix.de> writes:
>
>> On Mon, 15 May 2023, Thomas Gleixner wrote:
>>
>>> On Mon, May 15 2023 at 18:20, Anna-Maria Behnsen wrote:
>>>
>>> > Dynamic allocated hotplug states in documentation and comment above
>>> > cpuhp_state enum do not match the code. To not get confused by wrong
>>> > documentation, change to proper state names.
>>> >
>>> > Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
>>>
>>> Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
>>>
>>
>> Ping?
>
> I didn't pick this up because linux/cpuhotplug.h is a bit outside my
> turf; I can certainly do so, though, if that seems like the best path.
I'll pick it up.
@@ -404,8 +404,8 @@ multi-instance state the following function is available:
* cpuhp_setup_state_multi(state, name, startup, teardown)
The @state argument is either a statically allocated state or one of the
-constants for dynamically allocated states - CPUHP_PREPARE_DYN,
-CPUHP_ONLINE_DYN - depending on the state section (PREPARE, ONLINE) for
+constants for dynamically allocated states - CPUHP_BP_PREPARE_DYN,
+CPUHP_AP_ONLINE_DYN - depending on the state section (PREPARE, ONLINE) for
which a dynamic state should be allocated.
The @name argument is used for sysfs output and for instrumentation. The
@@ -597,7 +597,7 @@ notifications on online and offline operations::
Setup and teardown a dynamically allocated state in the ONLINE section
for notifications on offline operations::
- state = cpuhp_setup_state(CPUHP_ONLINE_DYN, "subsys:offline", NULL, subsys_cpu_offline);
+ state = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "subsys:offline", NULL, subsys_cpu_offline);
if (state < 0)
return state;
....
@@ -606,7 +606,7 @@ for notifications on offline operations::
Setup and teardown a dynamically allocated state in the ONLINE section
for notifications on online operations without invoking the callbacks::
- state = cpuhp_setup_state_nocalls(CPUHP_ONLINE_DYN, "subsys:online", subsys_cpu_online, NULL);
+ state = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "subsys:online", subsys_cpu_online, NULL);
if (state < 0)
return state;
....
@@ -615,7 +615,7 @@ for notifications on online operations without invoking the callbacks::
Setup, use and teardown a dynamically allocated multi-instance state in the
ONLINE section for notifications on online and offline operation::
- state = cpuhp_setup_state_multi(CPUHP_ONLINE_DYN, "subsys:online", subsys_cpu_online, subsys_cpu_offline);
+ state = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN, "subsys:online", subsys_cpu_online, subsys_cpu_offline);
if (state < 0)
return state;
....
@@ -48,7 +48,7 @@
* same section.
*
* If neither #1 nor #2 apply, please use the dynamic state space when
- * setting up a state by using CPUHP_PREPARE_DYN or CPUHP_PREPARE_ONLINE
+ * setting up a state by using CPUHP_BP_PREPARE_DYN or CPUHP_AP_ONLINE_DYN
* for the @state argument of the setup function.
*
* See Documentation/core-api/cpu_hotplug.rst for further information and