summaryrefslogtreecommitdiff
path: root/kernel/sched/cpufreq_schedutil.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-10-06 15:01:31 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-10-07 18:11:37 +0300
commit86836bac55f971995499978df4e62115d7baf5ef (patch)
tree70032b0ebf66450ff1f9f493398c680dacc44551 /kernel/sched/cpufreq_schedutil.c
parenta17a733e377d288b3091fa79e6ce3ad5b5bf8753 (diff)
downloadlinux-86836bac55f971995499978df4e62115d7baf5ef.tar.xz
cpufreq: schedutil: Simplify sugov_fast_switch()
Drop a redundant local variable definition from sugov_fast_switch() and rearrange the code in there to avoid the redundant logical negation. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'kernel/sched/cpufreq_schedutil.c')
-rw-r--r--kernel/sched/cpufreq_schedutil.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index 28f6d1ad608b..5ae7b4e6e8d6 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -114,12 +114,8 @@ static bool sugov_update_next_freq(struct sugov_policy *sg_policy, u64 time,
static void sugov_fast_switch(struct sugov_policy *sg_policy, u64 time,
unsigned int next_freq)
{
- struct cpufreq_policy *policy = sg_policy->policy;
-
- if (!sugov_update_next_freq(sg_policy, time, next_freq))
- return;
-
- cpufreq_driver_fast_switch(policy, next_freq);
+ if (sugov_update_next_freq(sg_policy, time, next_freq))
+ cpufreq_driver_fast_switch(sg_policy->policy, next_freq);
}
static void sugov_deferred_update(struct sugov_policy *sg_policy, u64 time,