From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linux PM <linux-pm@vger.kernel.org>, Doug Smythies <dsmythies@telus.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>
Subject: [PATCH v1 2/2] cpuidle: teo: Rename two local variables in teo_select()
Date: Fri, 30 Jul 2021 16:38:52 +0200 [thread overview]
Message-ID: <12823871.uLZWGnKmhe@kreacher> (raw)
In-Reply-To: <4336554.LvFx2qVVIh@kreacher>
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Rename two local variables in teo_select() so that their names better
reflect their purpose.
No functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/cpuidle/governors/teo.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
Index: linux-pm/drivers/cpuidle/governors/teo.c
===================================================================
--- linux-pm.orig/drivers/cpuidle/governors/teo.c
+++ linux-pm/drivers/cpuidle/governors/teo.c
@@ -382,8 +382,8 @@ static int teo_select(struct cpuidle_dri
alt_intercepts = 2 * idx_intercept_sum > cpu_data->total - idx_hit_sum;
alt_recent = idx_recent_sum > NR_RECENT / 2;
if (alt_recent || alt_intercepts) {
- s64 last_enabled_span_ns = duration_ns;
- int last_enabled_idx = idx;
+ s64 first_suitable_span_ns = duration_ns;
+ int first_suitable_idx = idx;
/*
* Look for the deepest idle state whose target residency had
@@ -419,8 +419,8 @@ static int teo_select(struct cpuidle_dri
* disabled, so take the first enabled
* deeper state with suitable time span.
*/
- idx = last_enabled_idx;
- duration_ns = last_enabled_span_ns;
+ idx = first_suitable_idx;
+ duration_ns = first_suitable_span_ns;
}
break;
}
@@ -434,14 +434,14 @@ static int teo_select(struct cpuidle_dri
* alternative candidate state has been found,
* it may still turn out to be a better choice.
*/
- if (last_enabled_idx != idx)
+ if (first_suitable_idx != idx)
continue;
break;
}
- last_enabled_span_ns = span_ns;
- last_enabled_idx = i;
+ first_suitable_span_ns = span_ns;
+ first_suitable_idx = i;
}
}
next prev parent reply other threads:[~2021-07-30 14:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-30 14:35 [PATCH v1 0/2] cpuidle: teo: Fix selection when idle state 0 is disabled Rafael J. Wysocki
2021-07-30 14:38 ` [PATCH v1 1/2] cpuidle: teo: Fix alternative idle state lookup Rafael J. Wysocki
2021-07-30 14:38 ` Rafael J. Wysocki [this message]
2021-07-31 4:04 ` [PATCH v1 0/2] cpuidle: teo: Fix selection when idle state 0 is disabled Doug Smythies
2021-08-03 13:18 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12823871.uLZWGnKmhe@kreacher \
--to=rjw@rjwysocki.net \
--cc=dsmythies@telus.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox