[tip:,sched/core] sched/fair: Rename variable cpu_util eff_util

Message ID 168682909369.404.14833174104608297588.tip-bot2@tip-bot2
State New
Headers
Series [tip:,sched/core] sched/fair: Rename variable cpu_util eff_util |

Commit Message

tip-bot2 for Thomas Gleixner June 15, 2023, 11:38 a.m. UTC
  The following commit has been merged into the sched/core branch of tip:

Commit-ID:     24cce6bc14759bbddd8d2252d733212e1911b977
Gitweb:        https://git.kernel.org/tip/24cce6bc14759bbddd8d2252d733212e1911b977
Author:        Tom Rix <trix@redhat.com>
AuthorDate:    Sun, 11 Jun 2023 08:25:35 -04:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Thu, 15 Jun 2023 13:28:20 +02:00

sched/fair: Rename variable cpu_util eff_util

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 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
  

Patch

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 819efad..0219cf8 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -7463,7 +7463,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
@@ -7472,8 +7472,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);