cpufreq / sched: Pass runqueue pointer to cpufreq_update_util()
[cascardo/linux.git] / kernel / sched / fair.c
index f91fa57..5d558cc 100644 (file)
@@ -2876,8 +2876,6 @@ static inline void update_tg_load_avg(struct cfs_rq *cfs_rq, int force) {}
 static inline void cfs_rq_util_change(struct cfs_rq *cfs_rq)
 {
        if (&this_rq()->cfs == cfs_rq) {
-               struct rq *rq = rq_of(cfs_rq);
-
                /*
                 * There are a few boundary cases this might miss but it should
                 * get called often enough that that should (hopefully) not be
@@ -2894,7 +2892,7 @@ static inline void cfs_rq_util_change(struct cfs_rq *cfs_rq)
                 *
                 * See cpu_util().
                 */
-               cpufreq_update_util(rq_clock(rq), 0);
+               cpufreq_update_util(rq_of(cfs_rq), 0);
        }
 }
 
@@ -3155,10 +3153,7 @@ update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq, bool update_freq)
 
 static inline void update_load_avg(struct sched_entity *se, int not_used)
 {
-       struct cfs_rq *cfs_rq = cfs_rq_of(se);
-       struct rq *rq = rq_of(cfs_rq);
-
-       cpufreq_update_util(rq_clock(rq), 0);
+       cpufreq_update_util(rq_of(cfs_rq_of(se)), 0);
 }
 
 static inline void