Commit d05374de authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://patch.msgid.link/5803791.DvuYhMxLoT@rjwysocki.net


Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 4acab508
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1356,7 +1356,8 @@ thermal_zone_device_register_with_trips(const char *type,
					int num_trips, void *devdata,
					const struct thermal_zone_device_ops *ops,
					const struct thermal_zone_params *tzp,
					int passive_delay, int polling_delay)
					unsigned int passive_delay,
					unsigned int polling_delay)
{
	const struct thermal_trip *trip = trips;
	struct thermal_zone_device *tz;
+2 −1
Original line number Diff line number Diff line
@@ -221,7 +221,8 @@ struct thermal_zone_device *thermal_zone_device_register_with_trips(
					int num_trips, void *devdata,
					const struct thermal_zone_device_ops *ops,
					const struct thermal_zone_params *tzp,
					int passive_delay, int polling_delay);
					unsigned int passive_delay,
					unsigned int polling_delay);

struct thermal_zone_device *thermal_tripless_zone_device_register(
					const char *type,