summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Blum <blum@kernel.org>2026-08-20 17:43:36 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-09-04 17:52:46 +0200
commit3a6a73ea980190a091a822ae54bafabc0dac6a4d (patch)
tree1db0e63b9e1e452099e3c24635e3ed78a16dbb51
parentefa25d2a661e111d8dbaa924e39fdd7c4da8b581 (diff)
thermal: intel: powerclamp: Simplify check_invalid()
Return the boolean expression directly and use const for the read-only mask parameter. Signed-off-by: Thorsten Blum <blum@kernel.org> Link: https://patch.msgid.link/20260820154339.47737-2-blum@kernel.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/thermal/intel/intel_powerclamp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/thermal/intel/intel_powerclamp.c b/drivers/thermal/intel/intel_powerclamp.c
index c94db9f9e9f7..d5b95e69a3a6 100644
--- a/drivers/thermal/intel/intel_powerclamp.c
+++ b/drivers/thermal/intel/intel_powerclamp.c
@@ -143,12 +143,9 @@ copy_mask:
}
/* Return true if the cpumask and idle percent combination is invalid */
-static bool check_invalid(cpumask_var_t mask, u8 idle)
+static bool check_invalid(const struct cpumask *mask, u8 idle)
{
- if (cpumask_equal(cpu_present_mask, mask) && idle > MAX_ALL_CPU_IDLE)
- return true;
-
- return false;
+ return cpumask_equal(cpu_present_mask, mask) && idle > MAX_ALL_CPU_IDLE;
}
static int cpumask_set(const char *arg, const struct kernel_param *kp)