Skip to content

Commit e0a99a8

Browse files
anna-marialxKAGA-KOKO
authored andcommitted
Documentation: core-api/cpuhotplug: Fix state names
Dynamic allocated hotplug states in documentation and the 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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 33af38d commit e0a99a8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: Documentation/core-api/cpu_hotplug.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ multi-instance state the following function is available:
395395
* cpuhp_setup_state_multi(state, name, startup, teardown)
396396

397397
The @state argument is either a statically allocated state or one of the
398-
constants for dynamically allocated states - CPUHP_PREPARE_DYN,
399-
CPUHP_ONLINE_DYN - depending on the state section (PREPARE, ONLINE) for
398+
constants for dynamically allocated states - CPUHP_BP_PREPARE_DYN,
399+
CPUHP_AP_ONLINE_DYN - depending on the state section (PREPARE, ONLINE) for
400400
which a dynamic state should be allocated.
401401

402402
The @name argument is used for sysfs output and for instrumentation. The
@@ -588,7 +588,7 @@ notifications on online and offline operations::
588588
Setup and teardown a dynamically allocated state in the ONLINE section
589589
for notifications on offline operations::
590590

591-
state = cpuhp_setup_state(CPUHP_ONLINE_DYN, "subsys:offline", NULL, subsys_cpu_offline);
591+
state = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "subsys:offline", NULL, subsys_cpu_offline);
592592
if (state < 0)
593593
return state;
594594
....
@@ -597,7 +597,7 @@ for notifications on offline operations::
597597
Setup and teardown a dynamically allocated state in the ONLINE section
598598
for notifications on online operations without invoking the callbacks::
599599

600-
state = cpuhp_setup_state_nocalls(CPUHP_ONLINE_DYN, "subsys:online", subsys_cpu_online, NULL);
600+
state = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "subsys:online", subsys_cpu_online, NULL);
601601
if (state < 0)
602602
return state;
603603
....
@@ -606,7 +606,7 @@ for notifications on online operations without invoking the callbacks::
606606
Setup, use and teardown a dynamically allocated multi-instance state in the
607607
ONLINE section for notifications on online and offline operation::
608608

609-
state = cpuhp_setup_state_multi(CPUHP_ONLINE_DYN, "subsys:online", subsys_cpu_online, subsys_cpu_offline);
609+
state = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN, "subsys:online", subsys_cpu_online, subsys_cpu_offline);
610610
if (state < 0)
611611
return state;
612612
....

Diff for: include/linux/cpuhotplug.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
* same section.
4949
*
5050
* If neither #1 nor #2 apply, please use the dynamic state space when
51-
* setting up a state by using CPUHP_PREPARE_DYN or CPUHP_PREPARE_ONLINE
51+
* setting up a state by using CPUHP_BP_PREPARE_DYN or CPUHP_AP_ONLINE_DYN
5252
* for the @state argument of the setup function.
5353
*
5454
* See Documentation/core-api/cpu_hotplug.rst for further information and

0 commit comments

Comments
 (0)