Skip to content

Commit 40927ab

Browse files
Yury Norovrafaeljw
authored andcommitted
thermal: intel: hfi: use cpumask_empty() in intel_hfi_offline()
cpumask_empty() is more efficient as it may return earlier. Switch to using it. Signed-off-by: Yury Norov <ynorov@nvidia.com> Link: https://patch.msgid.link/20260314191016.603067-1-ynorov@nvidia.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 6d3e2ce commit 40927ab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/thermal/intel/intel_hfi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ void intel_hfi_offline(unsigned int cpu)
526526
mutex_lock(&hfi_instance_lock);
527527
cpumask_clear_cpu(cpu, hfi_instance->cpus);
528528

529-
if (!cpumask_weight(hfi_instance->cpus))
529+
if (cpumask_empty(hfi_instance->cpus))
530530
hfi_disable();
531531

532532
mutex_unlock(&hfi_instance_lock);

0 commit comments

Comments
 (0)