From: Riwen Lu <luriwen@hotmail.com>
To: rafael@kernel.org, viresh.kumar@linaro.org
Cc: ionela.voinescu@arm.com, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, Riwen Lu <luriwen@kylinos.cn>
Subject: [PATCH v1] cpufreq/cppc: Remove desired_perf temporary variable
Date: Mon, 17 Jun 2024 15:28:05 +0800 [thread overview]
Message-ID: <OS3P286MB249037D0472F6BCCFFD162D1B1CD2@OS3P286MB2490.JPNP286.PROD.OUTLOOK.COM> (raw)
From: Riwen Lu <luriwen@kylinos.cn>
There's no need of the desired_perf temporary variable in
cppc_cpufreq_fast_switch(), remove it to simplify code.
Signed-off-by: Riwen Lu <luriwen@kylinos.cn>
---
drivers/cpufreq/cppc_cpufreq.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
index 9095fd5f8c2d..9a5af756e447 100644
--- a/drivers/cpufreq/cppc_cpufreq.c
+++ b/drivers/cpufreq/cppc_cpufreq.c
@@ -314,11 +314,10 @@ static unsigned int cppc_cpufreq_fast_switch(struct cpufreq_policy *policy,
{
struct cppc_cpudata *cpu_data = policy->driver_data;
unsigned int cpu = policy->cpu;
- u32 desired_perf;
int ret;
- desired_perf = cppc_khz_to_perf(&cpu_data->perf_caps, target_freq);
- cpu_data->perf_ctrls.desired_perf = desired_perf;
+ cpu_data->perf_ctrls.desired_perf =
+ cppc_khz_to_perf(&cpu_data->perf_caps, target_freq);
ret = cppc_set_perf(cpu, &cpu_data->perf_ctrls);
if (ret) {
--
2.25.1
reply other threads:[~2024-06-17 7:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=OS3P286MB249037D0472F6BCCFFD162D1B1CD2@OS3P286MB2490.JPNP286.PROD.OUTLOOK.COM \
--to=luriwen@hotmail.com \
--cc=ionela.voinescu@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=luriwen@kylinos.cn \
--cc=rafael@kernel.org \
--cc=viresh.kumar@linaro.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
all inboxes | Powered by JetHome®