[PATCH 12/14] debugobjects, cpu/hotplug: Update name & callback to match the hotplug state

From: Srivatsa S. Bhat (Microsoft)

Date: Thu Dec 03 2026 - 14:20:51 EST


The debugobjects teardown callback is registered at CPUHP_DEBUG_OBJ_DEAD,
but its state name is "object:offline". This is misleading because the
'offline' suffix denotes a teardown-only state in the ONLINE section,
and not the PREPARE section where this callback actually runs.

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

Also, rename the registered CPU hotplug teardown callback to match the
state that it is associated with.

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

Fixes: 88451f2cd3ce ("debugobjects: Free per CPU pool after CPU unplug")
Signed-off-by: Srivatsa S. Bhat (Microsoft) <srivatsa@xxxxxxxxxxxxx>
---
lib/debugobjects.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index 877f7675ba26..723fe9e42b31 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -569,7 +569,7 @@ static void put_objects(struct hlist_head *list)
}

#ifdef CONFIG_HOTPLUG_CPU
-static int object_cpu_offline(unsigned int cpu)
+static int object_cpu_dead(unsigned int cpu)
{
/* Remote access is safe as the CPU is dead already */
struct obj_pool *pcp = per_cpu_ptr(&pool_pcpu, cpu);
@@ -1578,8 +1578,8 @@ void __init debug_objects_mem_init(void)
static_branch_enable(&obj_cache_enabled);

#ifdef CONFIG_HOTPLUG_CPU
- cpuhp_setup_state_nocalls(CPUHP_DEBUG_OBJ_DEAD, "object:offline", NULL,
- object_cpu_offline);
+ cpuhp_setup_state_nocalls(CPUHP_DEBUG_OBJ_DEAD, "object:dead", NULL,
+ object_cpu_dead);
#endif
return;
}

--
2.43.0