sched/cpufreq: Don't pass flags to sugov_set_iowait_boost()
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 13 Dec 2017 09:53:22 +0000 (15:23 +0530)
committerIngo Molnar <mingo@kernel.org>
Wed, 10 Jan 2018 10:30:29 +0000 (11:30 +0100)
We are already passing sg_cpu as argument to sugov_set_iowait_boost()
helper and the same can be used to retrieve the flags value. Get rid of
the redundant argument.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael Wysocki <rjw@rjwysocki.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: dietmar.eggemann@arm.com
Cc: joelaf@google.com
Cc: juri.lelli@redhat.com
Cc: morten.rasmussen@arm.com
Cc: tkjos@android.com
Link: http://lkml.kernel.org/r/4ec5562b1a87e146ebab11fb5dde1ca9c763a7fb.1513158452.git.viresh.kumar@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/cpufreq_schedutil.c

index 22d4630..6dd1ec9 100644 (file)
@@ -187,10 +187,9 @@ static void sugov_get_util(unsigned long *util, unsigned long *max, int cpu)
        *max = cfs_max;
 }
 
-static void sugov_set_iowait_boost(struct sugov_cpu *sg_cpu, u64 time,
-                                  unsigned int flags)
+static void sugov_set_iowait_boost(struct sugov_cpu *sg_cpu, u64 time)
 {
-       if (flags & SCHED_CPUFREQ_IOWAIT) {
+       if (sg_cpu->flags & SCHED_CPUFREQ_IOWAIT) {
                if (sg_cpu->iowait_boost_pending)
                        return;
 
@@ -264,7 +263,7 @@ static void sugov_update_single(struct update_util_data *hook, u64 time,
        unsigned int next_f;
        bool busy;
 
-       sugov_set_iowait_boost(sg_cpu, time, flags);
+       sugov_set_iowait_boost(sg_cpu, time);
        sg_cpu->last_update = time;
 
        if (!sugov_should_update_freq(sg_policy, time))
@@ -349,7 +348,7 @@ static void sugov_update_shared(struct update_util_data *hook, u64 time,
        sg_cpu->max = max;
        sg_cpu->flags = flags;
 
-       sugov_set_iowait_boost(sg_cpu, time, flags);
+       sugov_set_iowait_boost(sg_cpu, time);
        sg_cpu->last_update = time;
 
        if (sugov_should_update_freq(sg_policy, time)) {