linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Documentation: core-api/cpuhotplug: Fix state names
@ 2023-05-15 16:20 Anna-Maria Behnsen
  2023-05-15 21:21 ` Thomas Gleixner
  2023-08-08  8:59 ` [tip: smp/core] " tip-bot2 for Anna-Maria Behnsen
  0 siblings, 2 replies; 6+ messages in thread
From: Anna-Maria Behnsen @ 2023-05-15 16:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-doc, Thomas Gleixner, Jonathan Corbet, Anna-Maria Behnsen

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

diff --git a/Documentation/core-api/cpu_hotplug.rst b/Documentation/core-api/cpu_hotplug.rst
index f75778d37488..95ead18dd9e0 100644
--- a/Documentation/core-api/cpu_hotplug.rst
+++ b/Documentation/core-api/cpu_hotplug.rst
@@ -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;
    ....
diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h
index 0f1001dca0e0..7b30f5cbf415 100644
--- a/include/linux/cpuhotplug.h
+++ b/include/linux/cpuhotplug.h
@@ -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
-- 
2.30.2


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

* Re: [PATCH] Documentation: core-api/cpuhotplug: Fix state names
  2023-05-15 16:20 [PATCH] Documentation: core-api/cpuhotplug: Fix state names Anna-Maria Behnsen
@ 2023-05-15 21:21 ` Thomas Gleixner
  2023-08-07 15:47   ` Anna-Maria Behnsen
  2023-08-08  8:59 ` [tip: smp/core] " tip-bot2 for Anna-Maria Behnsen
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Gleixner @ 2023-05-15 21:21 UTC (permalink / raw)
  To: Anna-Maria Behnsen, linux-kernel
  Cc: linux-doc, Jonathan Corbet, Anna-Maria Behnsen

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>

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

* Re: [PATCH] Documentation: core-api/cpuhotplug: Fix state names
  2023-05-15 21:21 ` Thomas Gleixner
@ 2023-08-07 15:47   ` Anna-Maria Behnsen
  2023-08-07 16:44     ` Jonathan Corbet
  0 siblings, 1 reply; 6+ messages in thread
From: Anna-Maria Behnsen @ 2023-08-07 15:47 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-kernel, linux-doc, Jonathan Corbet

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?

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

* Re: [PATCH] Documentation: core-api/cpuhotplug: Fix state names
  2023-08-07 15:47   ` Anna-Maria Behnsen
@ 2023-08-07 16:44     ` Jonathan Corbet
  2023-08-08  8:54       ` Thomas Gleixner
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Corbet @ 2023-08-07 16:44 UTC (permalink / raw)
  To: Anna-Maria Behnsen, Thomas Gleixner; +Cc: linux-kernel, linux-doc

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

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

* Re: [PATCH] Documentation: core-api/cpuhotplug: Fix state names
  2023-08-07 16:44     ` Jonathan Corbet
@ 2023-08-08  8:54       ` Thomas Gleixner
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Gleixner @ 2023-08-08  8:54 UTC (permalink / raw)
  To: Jonathan Corbet, Anna-Maria Behnsen; +Cc: linux-kernel, linux-doc

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.

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

* [tip: smp/core] Documentation: core-api/cpuhotplug: Fix state names
  2023-05-15 16:20 [PATCH] Documentation: core-api/cpuhotplug: Fix state names Anna-Maria Behnsen
  2023-05-15 21:21 ` Thomas Gleixner
@ 2023-08-08  8:59 ` tip-bot2 for Anna-Maria Behnsen
  1 sibling, 0 replies; 6+ messages in thread
From: tip-bot2 for Anna-Maria Behnsen @ 2023-08-08  8:59 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Anna-Maria Behnsen, Thomas Gleixner, x86, linux-kernel

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

Commit-ID:     e0a99a839f04c90bf9f16919997c4b34f9c8f1f0
Gitweb:        https://git.kernel.org/tip/e0a99a839f04c90bf9f16919997c4b34f9c8f1f0
Author:        Anna-Maria Behnsen <anna-maria@linutronix.de>
AuthorDate:    Mon, 15 May 2023 18:20:38 +02:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 08 Aug 2023 10:55:58 +02:00

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 <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20230515162038.62703-1-anna-maria@linutronix.de
---
 Documentation/core-api/cpu_hotplug.rst | 10 +++++-----
 include/linux/cpuhotplug.h             |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/core-api/cpu_hotplug.rst b/Documentation/core-api/cpu_hotplug.rst
index e6f5bc3..b9ae591 100644
--- a/Documentation/core-api/cpu_hotplug.rst
+++ b/Documentation/core-api/cpu_hotplug.rst
@@ -395,8 +395,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
@@ -588,7 +588,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;
    ....
@@ -597,7 +597,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;
    ....
@@ -606,7 +606,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;
    ....
diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h
index 25b6e6e..06dda85 100644
--- a/include/linux/cpuhotplug.h
+++ b/include/linux/cpuhotplug.h
@@ -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

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

end of thread, other threads:[~2023-08-08 17:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-15 16:20 [PATCH] Documentation: core-api/cpuhotplug: Fix state names Anna-Maria Behnsen
2023-05-15 21:21 ` Thomas Gleixner
2023-08-07 15:47   ` Anna-Maria Behnsen
2023-08-07 16:44     ` Jonathan Corbet
2023-08-08  8:54       ` Thomas Gleixner
2023-08-08  8:59 ` [tip: smp/core] " tip-bot2 for Anna-Maria Behnsen

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