[<prev] [next>] [day] [month] [year] [list]
Message-ID:
<OS3P286MB249037D0472F6BCCFFD162D1B1CD2@OS3P286MB2490.JPNP286.PROD.OUTLOOK.COM>
Date: Mon, 17 Jun 2024 15:28:05 +0800
From: Riwen Lu <luriwen@...mail.com>
To: rafael@...nel.org,
viresh.kumar@...aro.org
Cc: ionela.voinescu@....com,
linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org,
Riwen Lu <luriwen@...inos.cn>
Subject: [PATCH v1] cpufreq/cppc: Remove desired_perf temporary variable
From: Riwen Lu <luriwen@...inos.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@...inos.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
Powered by blists - more mailing lists