Searched hist:"1 bcebcab887ba4c4d790d7ccb055303c5dc7dbbb" (Results 1 – 1 of 1) sorted by relevance
/linux/drivers/thermal/intel/int340x_thermal/ |
H A D | int340x_thermal_zone.c | diff 1bcebcab887ba4c4d790d7ccb055303c5dc7dbbb Mon Jan 30 19:47:43 CET 2023 Rafael J. Wysocki <rafael.j.wysocki@intel.com> thermal: intel: int340x: Improve int340x_thermal_set_trip_temp()
Instead of using snprintf() to populate the ACPI object name in int340x_thermal_set_trip_temp(), use an appropriate initializer and make the function fail if its trip argument is greater than 9, because ACPI object names can only be 4 characters long and it does not make sense to even try to evaluate objects with longer names (that argument is guaranteed to be non-negative, because it comes from the thermal code that will not pass negative trip numbers to zone callbacks).
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Tested-by: Zhang Rui <rui.zhang@intel.com> Reviewed-by: Zhang Rui <rui.zhang@intel.com>
|