diff options
| author | Yury Norov <ynorov@nvidia.com> | 2026-03-14 15:10:15 -0400 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-03-19 19:17:46 +0100 |
| commit | 40927abf2fed04cd242b269720ce0192604e2027 (patch) | |
| tree | 1929c079d0bbbeab4c3f8121c1cf654b8006bcfa /drivers | |
| parent | 6d3e2ce6f10107c2e5870e9dce7c2e1d03a6be72 (diff) | |
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>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/thermal/intel/intel_hfi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/intel/intel_hfi.c b/drivers/thermal/intel/intel_hfi.c index 1a1a95b39405..8c4ae75231f8 100644 --- a/drivers/thermal/intel/intel_hfi.c +++ b/drivers/thermal/intel/intel_hfi.c @@ -526,7 +526,7 @@ void intel_hfi_offline(unsigned int cpu) mutex_lock(&hfi_instance_lock); cpumask_clear_cpu(cpu, hfi_instance->cpus); - if (!cpumask_weight(hfi_instance->cpus)) + if (cpumask_empty(hfi_instance->cpus)) hfi_disable(); mutex_unlock(&hfi_instance_lock); |
