]> git.ipfire.org Git - thirdparty/linux.git/commit
thermal: core: Change passive_delay and polling_delay data type
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 5 Jul 2024 19:44:50 +0000 (21:44 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 9 Jul 2024 16:19:24 +0000 (18:19 +0200)
commitd05374dee295d771261d382f97c0c23cb15aa104
treeda93c4ff681ac66cf1b13fa5d354f58b364abbed
parent4acab508eb03dc1827db6005764de29299e07569
thermal: core: Change passive_delay and polling_delay data type

It is better to use unsigned int as the data type for the passive_delay
and polling_delay arguments of thermal_zone_device_register_with_trips()
because they are implicitly cast to unsigned int anyway in
thermal_set_delay_jiffies() and if they happen to be negative at that
point, the resulting behavior may not be as desired.

Update the thermal_zone_device_register_with_trips() definition
accordingly.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://patch.msgid.link/5803791.DvuYhMxLoT@rjwysocki.net
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/thermal_core.c
include/linux/thermal.h