mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
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: Yury Norov <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
1 parent
26291c54e1
commit
a11cda8e2f
1 file changed
+3
-6
@@ -556,12 +556,9 @@ static void end_power_clamp(void)
|
||||
* stop faster.
|
||||
*/
|
||||
clamping = false;
|
||||
if (bitmap_weight(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",
|
||||
i);
|
||||
stop_power_clamp_worker(i);
|
||||
}
|
||||
for_each_set_bit(i, cpu_clamping_mask, num_possible_cpus()) {
|
||||
pr_debug("clamping worker for cpu %d alive, destroy\n", i);
|
||||
stop_power_clamp_worker(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user