From c347f31ae27f6196afbe812acd09af3f076ff117 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Thu, 24 Apr 2025 21:50:15 +0530 Subject: [PATCH] cpufreq: Don't unnecessarily call set_boost() The policy specific boost value may already be set correctly in cpufreq_boost_trigger_state(), don't update it again unnecessarily. Reviewed-by: Lifeng Zheng Signed-off-by: Viresh Kumar Link: https://patch.msgid.link/3003fbdcc1850128fe7fb653d7ddb8afc4d66170.1745511526.git.viresh.kumar@linaro.org Signed-off-by: Rafael J. Wysocki --- drivers/cpufreq/cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 1452692d1d2c..5e6e34e7a5b8 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -2807,7 +2807,7 @@ static int cpufreq_boost_trigger_state(int state) cpus_read_lock(); for_each_active_policy(policy) { - if (!policy->boost_supported) + if (!policy->boost_supported || policy->boost_enabled == state) continue; policy->boost_enabled = state; -- 2.50.1