Commit 932da648 authored by Dhananjay Ugwekar's avatar Dhananjay Ugwekar Committed by Mario Limonciello
Browse files

cpufreq/amd-pstate: Remove the redundant des_perf clamping in adjust_perf



des_perf is later on clamped between min_perf and max_perf in
amd_pstate_update. So, remove the redundant clamping from
amd_pstate_adjust_perf.

Signed-off-by: default avatarDhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Reviewed-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Reviewed-by: default avatarGautham R. Shenoy <gautham.shenoy@amd.com>
Link: https://lore.kernel.org/r/20250205112523.201101-5-dhananjay.ugwekar@amd.com


Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
parent 6ceb877d
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -703,8 +703,6 @@ static void amd_pstate_adjust_perf(unsigned int cpu,
	if (max_perf < min_perf)
		max_perf = min_perf;

	des_perf = clamp_t(unsigned long, des_perf, min_perf, max_perf);

	amd_pstate_update(cpudata, min_perf, des_perf, max_perf, true,
			policy->governor->flags);
	cpufreq_cpu_put(policy);