[PATCH] thermal: intel: Use clamp() in pkg_temp_thermal_device_add()
From: Thorsten Blum
Date: Mon Nov 16 2026 - 07:17:58 EST
Use the simpler clamp() macro since the values are compatible.
Signed-off-by: Thorsten Blum <blum@xxxxxxxxxx>
---
drivers/thermal/intel/x86_pkg_temp_thermal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/intel/x86_pkg_temp_thermal.c b/drivers/thermal/intel/x86_pkg_temp_thermal.c
index 43fd5bdf1d8d..2b6265b80fe1 100644
--- a/drivers/thermal/intel/x86_pkg_temp_thermal.c
+++ b/drivers/thermal/intel/x86_pkg_temp_thermal.c
@@ -327,7 +327,7 @@ static int pkg_temp_thermal_device_add(unsigned int cpu)
if (!thres_count)
return -ENODEV;
- thres_count = clamp_val(thres_count, 0, MAX_NUMBER_OF_TRIPS);
+ thres_count = clamp(thres_count, 0, MAX_NUMBER_OF_TRIPS);
tj_max = intel_tcc_get_tjmax(cpu);
if (tj_max < 0)