Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba88da17 authored by David Collins's avatar David Collins
Browse files

thermal: step_wise: suppress compiler warning



Cast 'type' to an int for comparison with -1 constant in order
to suppress this compiler warning:

drivers/thermal/step_wise.c:123:43: warning: comparison of
constant 4294967295 with enum 'enum thermal_trip_type'
(range [0, 3]) has undefined behavior [-Wenum-compare]

Change-Id: I1d73367c984a2818132dc13887d9b411184e6158
Signed-off-by: default avatarDavid Collins <collinsd@codeaurora.org>
parent acef0e10
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ static void update_passive_instance(struct thermal_zone_device *tz,
	 * If value is +1, activate a passive instance.
	 * If value is -1, deactivate a passive instance.
	 */
	if (type == THERMAL_TRIP_PASSIVE || type == THERMAL_TRIPS_NONE)
	if (type == THERMAL_TRIP_PASSIVE || (int)type == THERMAL_TRIPS_NONE)
		tz->passive += value;
}