Re: [PATCH 09/14] leds/trigger/cpu, hotplug: Update name & callbacks to match their hotplug states

From: Prasanna Kumar T S M

Date: Fri Dec 04 2026 - 02:21:57 EST




On 04-12-2026 00:46, Srivatsa S. Bhat (Microsoft) wrote:
The CPU LED trigger registers its CPU hotplug callbacks at
CPUHP_AP_ONLINE_DYN, but names the state "leds/trigger:starting".
This is misleading because the 'starting' suffix denotes the earlier,
interrupts-disabled STARTING section, and not the ONLINE section.

Rename it to "leds/trigger:online", following the naming convention
documented in Documentation/core-api/cpu_hotplug.rst.

Also, rename the registered CPU hotplug startup and teardown callbacks
to match the states that they are associated with.

No functional change intended, except for the update to the name string,
which gets reflected in sysfs output and instrumentation.

Fixes: 73c1b41e63f0 ("cpu/hotplug: Cleanup state names")
Signed-off-by: Srivatsa S. Bhat (Microsoft) <srivatsa@xxxxxxxxxxxxx>
---
drivers/leds/trigger/ledtrig-cpu.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/leds/trigger/ledtrig-cpu.c b/drivers/leds/trigger/ledtrig-cpu.c
index 679323c2ccda..5e3cb6c98843 100644
--- a/drivers/leds/trigger/ledtrig-cpu.c
+++ b/drivers/leds/trigger/ledtrig-cpu.c
@@ -120,13 +120,13 @@ static struct syscore ledtrig_cpu_syscore = {
.ops = &ledtrig_cpu_syscore_ops,
};
-static int ledtrig_online_cpu(unsigned int cpu)
+static int ledtrig_cpu_online(unsigned int cpu)
{
ledtrig_cpu(CPU_LED_START);
return 0;
}
-static int ledtrig_prepare_down_cpu(unsigned int cpu)
+static int ledtrig_cpu_offline(unsigned int cpu)
{
ledtrig_cpu(CPU_LED_STOP);
return 0;
@@ -163,8 +163,8 @@ static int __init ledtrig_cpu_init(void)
register_syscore(&ledtrig_cpu_syscore);
- ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "leds/trigger:starting",
- ledtrig_online_cpu, ledtrig_prepare_down_cpu);
+ ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "leds/trigger:online",
+ ledtrig_cpu_online, ledtrig_cpu_offline);
if (ret < 0)
pr_err("CPU hotplug notifier for ledtrig-cpu could not be registered: %d\n",
ret);


Looks good to me.

Reviewed-by: Prasanna Kumar T S M <ptsm@xxxxxxxxxxxxxxxxxxx>