From 6cd5f860233d60c196605b5a4233feb70dd0b086 Mon Sep 17 00:00:00 2001 From: Alexander Winkowski Date: Tue, 23 Aug 2022 10:14:47 +0000 Subject: [PATCH] cpufreq: schedutil: Give explicit hints to compiler Make sure the compiler optimises away conditions that are always false since commit b91319892e5cfd7e6a506ce4b7117ffed5d6de06 (cpufreq: schedutil: Don't jump to max frequency for RT tasks). Change-Id: I7a108ff1a4ba09f2cb82ea8a82bd15967e724709 Signed-off-by: Alexander Winkowski --- kernel/sched/cpufreq_schedutil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index 0687bb36fb23..366ac2d783ed 100755 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -334,7 +334,7 @@ static void sugov_update_single(struct update_util_data *hook, u64 time, busy = use_pelt() && sugov_cpu_is_busy(sg_cpu); - if (flags & SCHED_CPUFREQ_RT_DL) { + if (0) { sg_policy->cached_raw_freq = sg_policy->prev_cached_raw_freq; next_f = policy->cpuinfo.max_freq; } else { @@ -382,7 +382,7 @@ static unsigned int sugov_next_freq_shared(struct sugov_cpu *sg_cpu, u64 time) j_sg_cpu->iowait_boost_pending = false; continue; } - if (j_sg_cpu->flags & SCHED_CPUFREQ_RT_DL) { + if (0) { sg_policy->cached_raw_freq = sg_policy->prev_cached_raw_freq; return policy->cpuinfo.max_freq; } @@ -424,7 +424,7 @@ static void sugov_update_shared(struct update_util_data *hook, u64 time, if (sugov_should_update_freq(sg_policy, time) && !(flags & SCHED_CPUFREQ_CONTINUE)) { - if (flags & SCHED_CPUFREQ_RT_DL) { + if (0) { next_f = sg_policy->policy->cpuinfo.max_freq; sg_policy->cached_raw_freq = sg_policy->prev_cached_raw_freq; } else {