Commit a11cda8e authored by Yury Norov's avatar Yury Norov Committed by Rafael J. Wysocki

thermal: intel_powerclamp: don't use bitmap_weight() in end_power_clamp()

Don't call bitmap_weight() if the following code can get by
without it.
Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 26291c54
...@@ -556,13 +556,10 @@ static void end_power_clamp(void) ...@@ -556,13 +556,10 @@ static void end_power_clamp(void)
* stop faster. * stop faster.
*/ */
clamping = false; clamping = false;
if (bitmap_weight(cpu_clamping_mask, num_possible_cpus())) {
for_each_set_bit(i, cpu_clamping_mask, num_possible_cpus()) { for_each_set_bit(i, cpu_clamping_mask, num_possible_cpus()) {
pr_debug("clamping worker for cpu %d alive, destroy\n", pr_debug("clamping worker for cpu %d alive, destroy\n", i);
i);
stop_power_clamp_worker(i); stop_power_clamp_worker(i);
} }
}
} }
static int powerclamp_cpu_online(unsigned int cpu) static int powerclamp_cpu_online(unsigned int cpu)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment