[PATCH v1] cpufreq/cppc: Remove desired_perf temporary variable
From: Riwen Lu
Date: Mon Jun 17 2024 - 03:28:31 EST
From: Riwen Lu <luriwen@xxxxxxxxxx>
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@xxxxxxxxxx>
---
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