[PATCH] thermal: intel: powerclamp: Simplify check_invalid()
From: Thorsten Blum
Date: Thu Aug 20 2026 - 12:10:38 EST
Return the boolean expression directly and use const for the read-only
mask parameter.
Signed-off-by: Thorsten Blum <blum@xxxxxxxxxx>
---
drivers/thermal/intel/intel_powerclamp.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/thermal/intel/intel_powerclamp.c b/drivers/thermal/intel/intel_powerclamp.c
index bd7fd98dc310..f54cc6a29d16 100644
--- a/drivers/thermal/intel/intel_powerclamp.c
+++ b/drivers/thermal/intel/intel_powerclamp.c
@@ -143,12 +143,9 @@ static int allocate_copy_idle_injection_mask(const struct cpumask *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)