Re: [PATCH 10/14] powercap/dtpm_cpu, hotplug: Update name & callback to match the hotplug state
From: Rafael J. Wysocki (Intel)
Date: Fri Dec 04 2026 - 07:41:11 EST
On Thu, Dec 3, 2026 at 8:20 PM Srivatsa S. Bhat (Microsoft)
<srivatsa@xxxxxxxxxxxxx> wrote:
>
> The powercap dtpm_cpu driver registers a CPU hotplug teardown callback
> at CPUHP_AP_DTPM_CPU_DEAD, but names the state "dtpm_cpu:offline". This
> is misleading because the 'offline' suffix denotes the (teardown-only
> state within the) ONLINE section, and not the PREPARE section where this
> callback actually runs.
>
> Rename it to "dtpm_cpu: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,
So Fixes: is not applicable AFAICS.
> except for the update to the name string,
> which gets reflected in sysfs output and instrumentation.
>
> Fixes: 4570ddda4338 ("powercap/drivers/dtpm: Encapsulate even more the code")
> Signed-off-by: Srivatsa S. Bhat (Microsoft) <srivatsa@xxxxxxxxxxxxx>
> ---
> drivers/powercap/dtpm_cpu.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/powercap/dtpm_cpu.c b/drivers/powercap/dtpm_cpu.c
> index 21355db6419d..39dd07bf0380 100644
> --- a/drivers/powercap/dtpm_cpu.c
> +++ b/drivers/powercap/dtpm_cpu.c
> @@ -167,7 +167,7 @@ static struct dtpm_ops dtpm_ops = {
> .release = pd_release,
> };
>
> -static int cpuhp_dtpm_cpu_offline(unsigned int cpu)
> +static int cpuhp_dtpm_cpu_dead(unsigned int cpu)
> {
> struct dtpm_cpu *dtpm_cpu;
>
> @@ -292,8 +292,8 @@ static int dtpm_cpu_init(void)
> * callbacks at different moments when the CPU online mask is
> * consistent with the power numbers we want to update.
> */
> - ret = cpuhp_setup_state(CPUHP_AP_DTPM_CPU_DEAD, "dtpm_cpu:offline",
> - NULL, cpuhp_dtpm_cpu_offline);
> + ret = cpuhp_setup_state(CPUHP_AP_DTPM_CPU_DEAD, "dtpm_cpu:dead",
> + NULL, cpuhp_dtpm_cpu_dead);
> if (ret < 0)
> return ret;
>
>
> --
> 2.43.0
>