diff mbox series

[4/8] drm/i915/pmu: Rename cpuhp_slot to cpuhp_state

Message ID 20241011225430.1219345-5-lucas.demarchi@intel.com (mailing list archive)
State New, archived
Headers show
Series Fix i915 pmu on bind/unbind | expand

Commit Message

Lucas De Marchi Oct. 11, 2024, 10:54 p.m. UTC
Both the documentation and most of other users call the return of
cpuhp_setup_state_multi() as "state". Follow that.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 drivers/gpu/drm/i915/i915_pmu.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Matt Roper Oct. 19, 2024, 12:08 a.m. UTC | #1
On Fri, Oct 11, 2024 at 03:54:26PM -0700, Lucas De Marchi wrote:
> Both the documentation and most of other users call the return of
> cpuhp_setup_state_multi() as "state". Follow that.
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_pmu.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
> index dc9f753369170..2e435f51867db 100644
> --- a/drivers/gpu/drm/i915/i915_pmu.c
> +++ b/drivers/gpu/drm/i915/i915_pmu.c
> @@ -1211,7 +1211,7 @@ static int i915_pmu_cpu_offline(unsigned int cpu, struct hlist_node *node)
>  	return 0;
>  }
>  
> -static enum cpuhp_state cpuhp_slot = CPUHP_INVALID;
> +static enum cpuhp_state cpuhp_state = CPUHP_INVALID;
>  
>  int i915_pmu_init(void)
>  {
> @@ -1225,28 +1225,28 @@ int i915_pmu_init(void)
>  		pr_notice("Failed to setup cpuhp state for i915 PMU! (%d)\n",
>  			  ret);
>  	else
> -		cpuhp_slot = ret;
> +		cpuhp_state = ret;
>  
>  	return 0;
>  }
>  
>  void i915_pmu_exit(void)
>  {
> -	if (cpuhp_slot != CPUHP_INVALID)
> -		cpuhp_remove_multi_state(cpuhp_slot);
> +	if (cpuhp_state != CPUHP_INVALID)
> +		cpuhp_remove_multi_state(cpuhp_state);
>  }
>  
>  static int i915_pmu_register_cpuhp_state(struct i915_pmu *pmu)
>  {
> -	if (cpuhp_slot == CPUHP_INVALID)
> +	if (cpuhp_state == CPUHP_INVALID)
>  		return -EINVAL;
>  
> -	return cpuhp_state_add_instance(cpuhp_slot, &pmu->cpuhp.node);
> +	return cpuhp_state_add_instance(cpuhp_state, &pmu->cpuhp.node);
>  }
>  
>  static void i915_pmu_unregister_cpuhp_state(struct i915_pmu *pmu)
>  {
> -	cpuhp_state_remove_instance(cpuhp_slot, &pmu->cpuhp.node);
> +	cpuhp_state_remove_instance(cpuhp_state, &pmu->cpuhp.node);
>  }
>  
>  void i915_pmu_register(struct drm_i915_private *i915)
> -- 
> 2.47.0
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index dc9f753369170..2e435f51867db 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -1211,7 +1211,7 @@  static int i915_pmu_cpu_offline(unsigned int cpu, struct hlist_node *node)
 	return 0;
 }
 
-static enum cpuhp_state cpuhp_slot = CPUHP_INVALID;
+static enum cpuhp_state cpuhp_state = CPUHP_INVALID;
 
 int i915_pmu_init(void)
 {
@@ -1225,28 +1225,28 @@  int i915_pmu_init(void)
 		pr_notice("Failed to setup cpuhp state for i915 PMU! (%d)\n",
 			  ret);
 	else
-		cpuhp_slot = ret;
+		cpuhp_state = ret;
 
 	return 0;
 }
 
 void i915_pmu_exit(void)
 {
-	if (cpuhp_slot != CPUHP_INVALID)
-		cpuhp_remove_multi_state(cpuhp_slot);
+	if (cpuhp_state != CPUHP_INVALID)
+		cpuhp_remove_multi_state(cpuhp_state);
 }
 
 static int i915_pmu_register_cpuhp_state(struct i915_pmu *pmu)
 {
-	if (cpuhp_slot == CPUHP_INVALID)
+	if (cpuhp_state == CPUHP_INVALID)
 		return -EINVAL;
 
-	return cpuhp_state_add_instance(cpuhp_slot, &pmu->cpuhp.node);
+	return cpuhp_state_add_instance(cpuhp_state, &pmu->cpuhp.node);
 }
 
 static void i915_pmu_unregister_cpuhp_state(struct i915_pmu *pmu)
 {
-	cpuhp_state_remove_instance(cpuhp_slot, &pmu->cpuhp.node);
+	cpuhp_state_remove_instance(cpuhp_state, &pmu->cpuhp.node);
 }
 
 void i915_pmu_register(struct drm_i915_private *i915)