* [PATCH] thermal: intel: Use clamp() in pkg_temp_thermal_device_add()
@ 2026-11-16 12:17 Thorsten Blum
0 siblings, 0 replies; only message in thread
From: Thorsten Blum @ 2026-11-16 12:17 UTC (permalink / raw)
To: Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Lukasz Luba,
Juergen Gross, Ingo Molnar, Dave Hansen, Ahmed S. Darwish
Cc: Thorsten Blum, Rafael J. Wysocki, linux-pm, linux-kernel
Use the simpler clamp() macro since the values are compatible.
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
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)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-16 12:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16 12:17 [PATCH] thermal: intel: Use clamp() in pkg_temp_thermal_device_add() Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox