Skip to content

Commit 86836ba

Browse files
committed
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>
1 parent a17a733 commit 86836ba

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

kernel/sched/cpufreq_schedutil.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,8 @@ static bool sugov_update_next_freq(struct sugov_policy *sg_policy, u64 time,
114114
static void sugov_fast_switch(struct sugov_policy *sg_policy, u64 time,
115115
unsigned int next_freq)
116116
{
117-
struct cpufreq_policy *policy = sg_policy->policy;
118-
119-
if (!sugov_update_next_freq(sg_policy, time, next_freq))
120-
return;
121-
122-
cpufreq_driver_fast_switch(policy, next_freq);
117+
if (sugov_update_next_freq(sg_policy, time, next_freq))
118+
cpufreq_driver_fast_switch(sg_policy->policy, next_freq);
123119
}
124120

125121
static void sugov_deferred_update(struct sugov_policy *sg_policy, u64 time,

0 commit comments

Comments
 (0)