lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ