thermal: intel: Use clamp() in pkg_temp_thermal_device_add()
PATCH 1/1 thermal: intel: Use clamp() in pkg_temp_thermal_device_add()
Use the simpler clamp() macro since the values are compatible.
Signed-off-by Thorsten Blum <[email protected]>
--- drivers/thermal/intel/x86_pkg_temp_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/intel/x86_pkg_temp_thermal.c +1 -1
@@ -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 )
Quoted 13 lines · Thorsten Blum
Use the simpler
clamp()macro since the values are compatible.Signed-off-by Thorsten Blum <[email protected]>--- drivers/thermal/intel/x86_pkg_temp_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/thermal/intel/x86_pkg_temp_thermal.c +0
-0
drivers/thermal/intel/x86_pkg_temp_thermal.c static int pkg_temp_thermal_device_add(unsigned int cpu) · line 333
Quoted 8 lines
drivers/thermal/intel/x86_pkg_temp_thermal.c +1
-1@@ -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 )
Applied as 7.5 material, thanks!