Skip to content

Commit 3a561ea

Browse files
lukaszluba-armrafaeljw
authored andcommitted
PM: EM: Fix nr_states warnings in static checks
During the static checks nr_states has been mentioned by the kernel test robot. Fix the warning in those 2 places. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent eb1ad4d commit 3a561ea

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kernel/power/energy_model.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ static int em_compute_costs(struct device *dev, struct em_perf_state *table,
280280
* em_dev_compute_costs() - Calculate cost values for new runtime EM table
281281
* @dev : Device for which the EM table is to be updated
282282
* @table : The new EM table that is going to get the costs calculated
283+
* @nr_states : Number of performance states
283284
*
284285
* Calculate the em_perf_state::cost values for new runtime EM table. The
285286
* values are used for EAS during task placement. It also calculates and sets
@@ -728,7 +729,6 @@ static void em_check_capacity_update(void)
728729
struct cpufreq_policy *policy;
729730
unsigned long em_max_perf;
730731
struct device *dev;
731-
int nr_states;
732732

733733
if (cpumask_test_cpu(cpu, cpu_done_mask))
734734
continue;
@@ -749,7 +749,6 @@ static void em_check_capacity_update(void)
749749
cpumask_or(cpu_done_mask, cpu_done_mask,
750750
em_span_cpus(pd));
751751

752-
nr_states = pd->nr_perf_states;
753752
cpu_capacity = arch_scale_cpu_capacity(cpu);
754753

755754
rcu_read_lock();

0 commit comments

Comments
 (0)