[PATCH 2/4] cpu/hotplug: Trivial doc updates in cpuhotplug.h
From: Srivatsa S. Bhat (Microsoft)
Date: Fri Nov 27 2026 - 02:27:53 EST
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@xxxxxxxxxxxxx>
---
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