sched/fair: Rename variable cpu_util eff_util
authorTom Rix <trix@redhat.com>
Sun, 11 Jun 2023 12:25:35 +0000 (08:25 -0400)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 16 Jun 2023 15:08:01 +0000 (17:08 +0200)
cppcheck reports
kernel/sched/fair.c:7436:17: style: Local variable 'cpu_util' shadows outer function [shadowFunction]
  unsigned long cpu_util;
                ^

Clean this up by renaming the variable to eff_util

Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Valentin Schneider <vschneid@redhat.com>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Link: https://lore.kernel.org/r/20230611122535.183654-1-trix@redhat.com
kernel/sched/fair.c

index 6189d1a45635f6b29c2c1d8f5a169c752c8fc79c..7666dbc2b78889c07229260ebb16979900c58828 100644 (file)
@@ -7433,7 +7433,7 @@ eenv_pd_max_util(struct energy_env *eenv, struct cpumask *pd_cpus,
        for_each_cpu(cpu, pd_cpus) {
                struct task_struct *tsk = (cpu == dst_cpu) ? p : NULL;
                unsigned long util = cpu_util(cpu, p, dst_cpu, 1);
-               unsigned long cpu_util;
+               unsigned long eff_util;
 
                /*
                 * Performance domain frequency: utilization clamping
@@ -7442,8 +7442,8 @@ eenv_pd_max_util(struct energy_env *eenv, struct cpumask *pd_cpus,
                 * NOTE: in case RT tasks are running, by default the
                 * FREQUENCY_UTIL's utilization can be max OPP.
                 */
-               cpu_util = effective_cpu_util(cpu, util, FREQUENCY_UTIL, tsk);
-               max_util = max(max_util, cpu_util);
+               eff_util = effective_cpu_util(cpu, util, FREQUENCY_UTIL, tsk);
+               max_util = max(max_util, eff_util);
        }
 
        return min(max_util, eenv->cpu_cap);