mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1] cpufreq/cppc: Remove desired_perf temporary variable
@ 2024-06-17  7:28 Riwen Lu
  0 siblings, 0 replies; only message in thread
From: Riwen Lu @ 2024-06-17  7:28 UTC (permalink / raw)
  To: rafael, viresh.kumar; +Cc: ionela.voinescu, linux-pm, linux-kernel, Riwen Lu

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-06-17  7:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-17  7:28 [PATCH v1] cpufreq/cppc: Remove desired_perf temporary variable Riwen Lu

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®