diff mbox series

[v4,3/4] intel_idle: rename 'intel_idle_hlt_irq_on()'

Message ID 20230710093100.918337-4-dedekind1@gmail.com
State New
Headers show
Series Sapphire Rapids C0.x idle states support | expand

Commit Message

Artem Bityutskiy July 10, 2023, 9:30 a.m. UTC
From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>

Rename 'intel_idle_hlt_irq_on()' to 'intel_idle_hlt_irq()' for consistency with
'intel_idle_irq()'.

While on it, fix indentation in 'intel_idle_hlt_irq()' declaration to use tabs
instead of white-spaces.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---
 drivers/idle/intel_idle.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Rafael J. Wysocki July 14, 2023, 3:34 p.m. UTC | #1
On Mon, Jul 10, 2023 at 11:31 AM Artem Bityutskiy <dedekind1@gmail.com> wrote:
>
> From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
>
> Rename 'intel_idle_hlt_irq_on()' to 'intel_idle_hlt_irq()' for consistency with
> 'intel_idle_irq()'.
>
> While on it, fix indentation in 'intel_idle_hlt_irq()' declaration to use tabs
> instead of white-spaces.
>
> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>

I think I can apply this right away without the rest of the series as
it doesn't seem to depend on the other patches.

Any concerns regarding this?

> ---
>  drivers/idle/intel_idle.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> index b930036edbbe..0a835f97de72 100644
> --- a/drivers/idle/intel_idle.c
> +++ b/drivers/idle/intel_idle.c
> @@ -224,8 +224,8 @@ static __cpuidle int intel_idle_hlt(struct cpuidle_device *dev,
>         return __intel_idle_hlt(dev, drv, index);
>  }
>
> -static __cpuidle int intel_idle_hlt_irq_on(struct cpuidle_device *dev,
> -                                   struct cpuidle_driver *drv, int index)
> +static __cpuidle int intel_idle_hlt_irq(struct cpuidle_device *dev,
> +                                       struct cpuidle_driver *drv, int index)
>  {
>         int ret;
>
> @@ -1900,11 +1900,11 @@ static void state_update_enter_method(struct cpuidle_state *state, int cstate)
>         if (state->enter == intel_idle_hlt) {
>                 if (force_irq_on) {
>                         pr_info("forced intel_idle_irq for state %d\n", cstate);
> -                       state->enter = intel_idle_hlt_irq_on;
> +                       state->enter = intel_idle_hlt_irq;
>                 }
>                 return;
>         }
> -       if (state->enter == intel_idle_hlt_irq_on)
> +       if (state->enter == intel_idle_hlt_irq)
>                 return; /* no update scenarios */
>
>         if (state->flags & CPUIDLE_FLAG_INIT_XSTATE) {
> @@ -1949,7 +1949,7 @@ static bool should_verify_mwait(struct cpuidle_state *state)
>  {
>         if (state->enter == intel_idle_hlt)
>                 return false;
> -       if (state->enter == intel_idle_hlt_irq_on)
> +       if (state->enter == intel_idle_hlt_irq)
>                 return false;
>
>         return true;
> --
> 2.40.1
>
Arjan van de Ven July 14, 2023, 3:39 p.m. UTC | #2
On 7/14/2023 8:34 AM, Rafael J. Wysocki wrote:
> On Mon, Jul 10, 2023 at 11:31 AM Artem Bityutskiy <dedekind1@gmail.com> wrote:
>>
>> From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
>>
>> Rename 'intel_idle_hlt_irq_on()' to 'intel_idle_hlt_irq()' for consistency with
>> 'intel_idle_irq()'.
>>
>> While on it, fix indentation in 'intel_idle_hlt_irq()' declaration to use tabs
>> instead of white-spaces.
>>
>> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> 
> I think I can apply this right away without the rest of the series as
> it doesn't seem to depend on the other patches.
> 
> Any concerns regarding this?
> 

no other than that I will likely delete some of the code in a next patch but that's ok
Artem Bityutskiy July 14, 2023, 6:11 p.m. UTC | #3
On Fri, 2023-07-14 at 17:34 +0200, Rafael J. Wysocki wrote:
> Any concerns regarding this?

No concerns, thanks!
Peter Zijlstra July 14, 2023, 9:01 p.m. UTC | #4
On Fri, Jul 14, 2023 at 05:34:43PM +0200, Rafael J. Wysocki wrote:
> On Mon, Jul 10, 2023 at 11:31 AM Artem Bityutskiy <dedekind1@gmail.com> wrote:
> >
> > From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> >
> > Rename 'intel_idle_hlt_irq_on()' to 'intel_idle_hlt_irq()' for consistency with
> > 'intel_idle_irq()'.
> >
> > While on it, fix indentation in 'intel_idle_hlt_irq()' declaration to use tabs
> > instead of white-spaces.
> >
> > Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> 
> I think I can apply this right away without the rest of the series as
> it doesn't seem to depend on the other patches.
> 
> Any concerns regarding this?

Yeah, as per:

  https://lkml.kernel.org/r/20230711132553.GN3062772%40hirez.programming.kicks-ass.net

that function is complete drivel, renaming it isn't going to help.

In fact, I don't buy the whole premise of that intel_idle guest mode
stuff, can we please just delete all of that and start over?
Arjan van de Ven July 14, 2023, 9:02 p.m. UTC | #5
On 7/14/2023 2:01 PM, Peter Zijlstra wrote:
> On Fri, Jul 14, 2023 at 05:34:43PM +0200, Rafael J. Wysocki wrote:
>> On Mon, Jul 10, 2023 at 11:31 AM Artem Bityutskiy <dedekind1@gmail.com> wrote:
>>>
>>> From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
>>>
>>> Rename 'intel_idle_hlt_irq_on()' to 'intel_idle_hlt_irq()' for consistency with
>>> 'intel_idle_irq()'.
>>>
>>> While on it, fix indentation in 'intel_idle_hlt_irq()' declaration to use tabs
>>> instead of white-spaces.
>>>
>>> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
>>
>> I think I can apply this right away without the rest of the series as
>> it doesn't seem to depend on the other patches.
>>
>> Any concerns regarding this?
> 
> Yeah, as per:
> 
>    https://lkml.kernel.org/r/20230711132553.GN3062772%40hirez.programming.kicks-ass.net

and it's going to get deleted - renaming is harmless for that
Peter Zijlstra July 14, 2023, 9:12 p.m. UTC | #6
On Fri, Jul 14, 2023 at 02:02:51PM -0700, Arjan van de Ven wrote:
> On 7/14/2023 2:01 PM, Peter Zijlstra wrote:
> > On Fri, Jul 14, 2023 at 05:34:43PM +0200, Rafael J. Wysocki wrote:
> > > On Mon, Jul 10, 2023 at 11:31 AM Artem Bityutskiy <dedekind1@gmail.com> wrote:
> > > > 
> > > > From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> > > > 
> > > > Rename 'intel_idle_hlt_irq_on()' to 'intel_idle_hlt_irq()' for consistency with
> > > > 'intel_idle_irq()'.
> > > > 
> > > > While on it, fix indentation in 'intel_idle_hlt_irq()' declaration to use tabs
> > > > instead of white-spaces.
> > > > 
> > > > Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> > > 
> > > I think I can apply this right away without the rest of the series as
> > > it doesn't seem to depend on the other patches.
> > > 
> > > Any concerns regarding this?
> > 
> > Yeah, as per:
> > 
> >    https://lkml.kernel.org/r/20230711132553.GN3062772%40hirez.programming.kicks-ass.net
> 
> and it's going to get deleted - renaming is harmless for that

Yeah, but what's the point, why waste more commits on this?
diff mbox series

Patch

diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index b930036edbbe..0a835f97de72 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -224,8 +224,8 @@  static __cpuidle int intel_idle_hlt(struct cpuidle_device *dev,
 	return __intel_idle_hlt(dev, drv, index);
 }
 
-static __cpuidle int intel_idle_hlt_irq_on(struct cpuidle_device *dev,
-                                   struct cpuidle_driver *drv, int index)
+static __cpuidle int intel_idle_hlt_irq(struct cpuidle_device *dev,
+					struct cpuidle_driver *drv, int index)
 {
        int ret;
 
@@ -1900,11 +1900,11 @@  static void state_update_enter_method(struct cpuidle_state *state, int cstate)
 	if (state->enter == intel_idle_hlt) {
 		if (force_irq_on) {
 			pr_info("forced intel_idle_irq for state %d\n", cstate);
-			state->enter = intel_idle_hlt_irq_on;
+			state->enter = intel_idle_hlt_irq;
 		}
 		return;
 	}
-	if (state->enter == intel_idle_hlt_irq_on)
+	if (state->enter == intel_idle_hlt_irq)
 		return; /* no update scenarios */
 
 	if (state->flags & CPUIDLE_FLAG_INIT_XSTATE) {
@@ -1949,7 +1949,7 @@  static bool should_verify_mwait(struct cpuidle_state *state)
 {
 	if (state->enter == intel_idle_hlt)
 		return false;
-	if (state->enter == intel_idle_hlt_irq_on)
+	if (state->enter == intel_idle_hlt_irq)
 		return false;
 
 	return true;