diff mbox series

[v1] cpufreq/cppc: Remove desired_perf temporary variable

Message ID OS3P286MB249037D0472F6BCCFFD162D1B1CD2@OS3P286MB2490.JPNP286.PROD.OUTLOOK.COM (mailing list archive)
State New
Delegated to: viresh kumar
Headers show
Series [v1] cpufreq/cppc: Remove desired_perf temporary variable | expand

Commit Message

Riwen Lu June 17, 2024, 7:28 a.m. UTC
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 mbox series

Patch

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) {