mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Srivatsa S. Bhat (Microsoft)" <srivatsa@csail.mit.edu>
To: Jonathan Corbet <corbet@lwn.net>,
	 Shuah Khan <skhan@linuxfoundation.org>,
	 Randy Dunlap <rdunlap@infradead.org>,
	Thomas Gleixner <tglx@kernel.org>,
	 Peter Zijlstra <peterz@infradead.org>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	 "Srivatsa S. Bhat" <srivatsa@csail.mit.edu>,
	 Prasanna Kumar T S M <ptsm@linux.microsoft.com>,
	 Saurabh Sengar <ssengar@linux.microsoft.com>
Subject: [PATCH 2/4] cpu/hotplug: Trivial doc updates in cpuhotplug.h
Date: Fri, 27 Nov 2026 12:56:59 +0530	[thread overview]
Message-ID: <20261127-docs-cpuhp-v1-2-a34a2c9f66fa@csail.mit.edu> (raw)
In-Reply-To: <20261127-docs-cpuhp-v1-0-a34a2c9f66fa@csail.mit.edu>

Make a few readability improvements and fix trivial inconsistencies in
the comments in include/linux/cpuhotplug.h

Signed-off-by: Srivatsa S. Bhat (Microsoft) <srivatsa@csail.mit.edu>
---
 include/linux/cpuhotplug.h | 69 +++++++++++++++++++++++-----------------------
 1 file changed, 34 insertions(+), 35 deletions(-)

diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h
index 1b6dba159bb2..f51303255bf0 100644
--- a/include/linux/cpuhotplug.h
+++ b/include/linux/cpuhotplug.h
@@ -15,7 +15,7 @@
  * BRINGUP_CPU->AP_OFFLINE	BRINGUP_CPU  <- AP_IDLE_DEAD (idle thread/play_dead)
  *		  |				AP_OFFLINE
  *		  v (IRQ-off)	  ,---------------^
- *		AP_ONLNE	  | (stop_machine)
+ *		AP_ONLINE	  | (stop_machine)
  *		  |		TEARDOWN_CPU <-	AP_ONLINE_IDLE
  *		  |				  ^
  *		  v				  |
@@ -23,9 +23,9 @@
  */
 
 /*
- * CPU hotplug states. The state machine invokes the installed state
+ * CPU hotplug states. The state machine invokes the installed state's
  * startup callbacks sequentially from CPUHP_OFFLINE + 1 to CPUHP_ONLINE
- * during a CPU online operation. During a CPU offline operation the
+ * during a CPU online operation. During a CPU offline operation, the
  * installed teardown callbacks are invoked in the reverse order from
  * CPUHP_ONLINE - 1 down to CPUHP_OFFLINE.
  *
@@ -250,9 +250,9 @@ int __cpuhp_setup_state_cpuslocked(enum cpuhp_state state, const char *name,
 				   int (*teardown)(unsigned int cpu),
 				   bool multi_instance);
 /**
- * cpuhp_setup_state - Setup hotplug state callbacks with calling the @startup
+ * cpuhp_setup_state - Setup hotplug state callbacks and invoke the @startup
  *                     callback
- * @state:	The state for which the calls are installed
+ * @state:	The state for which the callbacks are installed
  * @name:	Name of the callback (will be used in debug output)
  * @startup:	startup callback function or NULL if not required
  * @teardown:	teardown callback function or NULL if not required
@@ -269,10 +269,10 @@ static inline int cpuhp_setup_state(enum cpuhp_state state,
 }
 
 /**
- * cpuhp_setup_state_cpuslocked - Setup hotplug state callbacks with calling
+ * cpuhp_setup_state_cpuslocked - Setup hotplug state callbacks and invoke the
  *				  @startup callback from a cpus_read_lock()
  *				  held region
- * @state:	The state for which the calls are installed
+ * @state:	The state for which the callbacks are installed
  * @name:	Name of the callback (will be used in debug output)
  * @startup:	startup callback function or NULL if not required
  * @teardown:	teardown callback function or NULL if not required
@@ -290,10 +290,10 @@ static inline int cpuhp_setup_state_cpuslocked(enum cpuhp_state state,
 }
 
 /**
- * cpuhp_setup_state_nocalls - Setup hotplug state callbacks without calling the
+ * cpuhp_setup_state_nocalls - Setup hotplug state callbacks without invoking the
  *			       @startup callback
- * @state:	The state for which the calls are installed
- * @name:	Name of the callback.
+ * @state:	The state for which the callbacks are installed
+ * @name:	Name of the callback (will be used in debug output)
  * @startup:	startup callback function or NULL if not required
  * @teardown:	teardown callback function or NULL if not required
  *
@@ -313,9 +313,8 @@ static inline int cpuhp_setup_state_nocalls(enum cpuhp_state state,
  * cpuhp_setup_state_nocalls_cpuslocked - Setup hotplug state callbacks without
  *					  invoking the @startup callback from
  *					  a cpus_read_lock() held region
- *			       callbacks
- * @state:	The state for which the calls are installed
- * @name:	Name of the callback.
+ * @state:	The state for which the callbacks are installed
+ * @name:	Name of the callback (will be used in debug output)
  * @startup:	startup callback function or NULL if not required
  * @teardown:	teardown callback function or NULL if not required
  *
@@ -332,15 +331,15 @@ static inline int cpuhp_setup_state_nocalls_cpuslocked(enum cpuhp_state state,
 }
 
 /**
- * cpuhp_setup_state_multi - Add callbacks for multi state
- * @state:	The state for which the calls are installed
- * @name:	Name of the callback.
+ * cpuhp_setup_state_multi - Add callbacks for multi-instance state
+ * @state:	The state for which the callbacks are installed
+ * @name:	Name of the callback (will be used in debug output)
  * @startup:	startup callback function or NULL if not required
  * @teardown:	teardown callback function or NULL if not required
  *
  * Sets the internal multi_instance flag and prepares a state to work as a multi
  * instance callback. No callbacks are invoked at this point. The callbacks are
- * invoked once an instance for this state are registered via
+ * invoked once an instance for this state is registered via
  * cpuhp_state_add_instance() or cpuhp_state_add_instance_nocalls()
  */
 static inline int cpuhp_setup_state_multi(enum cpuhp_state state,
@@ -361,10 +360,10 @@ int __cpuhp_state_add_instance_cpuslocked(enum cpuhp_state state,
 					  struct hlist_node *node, bool invoke);
 
 /**
- * cpuhp_state_add_instance - Add an instance for a state and invoke startup
- *                            callback.
+ * cpuhp_state_add_instance - Add an instance for a state and invoke its
+ *                            startup callback.
  * @state:	The state for which the instance is installed
- * @node:	The node for this individual state.
+ * @node:	The node for this individual instance.
  *
  * Installs the instance for the @state and invokes the registered startup
  * callback on the online cpus which have already reached the @state. The
@@ -379,12 +378,12 @@ static inline int cpuhp_state_add_instance(enum cpuhp_state state,
 
 /**
  * cpuhp_state_add_instance_nocalls - Add an instance for a state without
- *                                    invoking the startup callback.
+ *                                    invoking its startup callback.
  * @state:	The state for which the instance is installed
- * @node:	The node for this individual state.
+ * @node:	The node for this individual instance.
  *
  * Installs the instance for the @state. The @state must have been earlier
- * marked as multi-instance by cpuhp_setup_state_multi. NOP if SMP=n or
+ * marked as multi-instance by cpuhp_setup_state_multi(). NOP if SMP=n or
  * HOTPLUG_CPU=n.
  */
 static inline int cpuhp_state_add_instance_nocalls(enum cpuhp_state state,
@@ -395,11 +394,11 @@ static inline int cpuhp_state_add_instance_nocalls(enum cpuhp_state state,
 
 /**
  * cpuhp_state_add_instance_nocalls_cpuslocked - Add an instance for a state
- *						 without invoking the startup
+ *						 without invoking its startup
  *						 callback from a cpus_read_lock()
  *						 held region.
  * @state:	The state for which the instance is installed
- * @node:	The node for this individual state.
+ * @node:	The node for this individual instance.
  *
  * Same as cpuhp_state_add_instance_nocalls() except that it must be
  * invoked from within a cpus_read_lock() held region.
@@ -416,7 +415,7 @@ void __cpuhp_remove_state_cpuslocked(enum cpuhp_state state, bool invoke);
 
 /**
  * cpuhp_remove_state - Remove hotplug state callbacks and invoke the teardown
- * @state:	The state for which the calls are removed
+ * @state:	The state for which the callbacks are removed
  *
  * Removes the callback functions and invokes the teardown callback on
  * the online cpus which have already reached the @state.
@@ -429,7 +428,7 @@ static inline void cpuhp_remove_state(enum cpuhp_state state)
 /**
  * cpuhp_remove_state_nocalls - Remove hotplug state callbacks without invoking
  *				the teardown callback
- * @state:	The state for which the calls are removed
+ * @state:	The state for which the callbacks are removed
  */
 static inline void cpuhp_remove_state_nocalls(enum cpuhp_state state)
 {
@@ -439,7 +438,7 @@ static inline void cpuhp_remove_state_nocalls(enum cpuhp_state state)
 /**
  * cpuhp_remove_state_nocalls_cpuslocked - Remove hotplug state callbacks without invoking
  *					   teardown from a cpus_read_lock() held region.
- * @state:	The state for which the calls are removed
+ * @state:	The state for which the callbacks are removed
  *
  * Same as cpuhp_remove_state nocalls() except that it must be invoked
  * from within a cpus_read_lock() held region.
@@ -450,12 +449,12 @@ static inline void cpuhp_remove_state_nocalls_cpuslocked(enum cpuhp_state state)
 }
 
 /**
- * cpuhp_remove_multi_state - Remove hotplug multi state callback
- * @state:	The state for which the calls are removed
+ * cpuhp_remove_multi_state - Remove hotplug multi-instance state callback
+ * @state:	The state for which the callbacks are removed
  *
- * Removes the callback functions from a multi state. This is the reverse of
- * cpuhp_setup_state_multi(). All instances should have been removed before
- * invoking this function.
+ * Removes the callback functions from a multi-instance state. This is
+ * the reverse of cpuhp_setup_state_multi(). All instances should have
+ * been removed before invoking this function.
  */
 static inline void cpuhp_remove_multi_state(enum cpuhp_state state)
 {
@@ -469,7 +468,7 @@ int __cpuhp_state_remove_instance(enum cpuhp_state state,
  * cpuhp_state_remove_instance - Remove hotplug instance from state and invoke
  *                               the teardown callback
  * @state:	The state from which the instance is removed
- * @node:	The node for this individual state.
+ * @node:	The node for this individual instance.
  *
  * Removes the instance and invokes the teardown callback on the online cpus
  * which have already reached @state.
@@ -484,7 +483,7 @@ static inline int cpuhp_state_remove_instance(enum cpuhp_state state,
  * cpuhp_state_remove_instance_nocalls - Remove hotplug instance from state
  *					 without invoking the teardown callback
  * @state:	The state from which the instance is removed
- * @node:	The node for this individual state.
+ * @node:	The node for this individual instance.
  *
  * Removes the instance without invoking the teardown callback.
  */

-- 
2.43.0


  parent reply	other threads:[~2026-11-27  7:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27  7:26 [PATCH 0/4] cpu/hotplug: Update documentation and naming convention for hotplug callbacks Srivatsa S. Bhat (Microsoft)
2026-11-27  7:26 ` [PATCH 1/4] Documentation: core-api/cpuhotplug: Fix a few minor inconsistencies Srivatsa S. Bhat (Microsoft)
2026-11-27  7:26 ` Srivatsa S. Bhat (Microsoft) [this message]
2026-11-27  7:27 ` [PATCH 3/4] cpu/hotplug: Demystify the terms 'BP' and 'AP' in the code Srivatsa S. Bhat (Microsoft)
2026-11-27  7:27 ` [PATCH 4/4] Documentation: core-api/cpuhotplug: Add naming convention for callbacks Srivatsa S. Bhat (Microsoft)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261127-docs-cpuhp-v1-2-a34a2c9f66fa@csail.mit.edu \
    --to=srivatsa@csail.mit.edu \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=ptsm@linux.microsoft.com \
    --cc=rdunlap@infradead.org \
    --cc=skhan@linuxfoundation.org \
    --cc=ssengar@linux.microsoft.com \
    --cc=tglx@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®