Skip to content

Commit

Permalink
thermal/core: Remove pointless test with the THERMAL_TRIPS_NONE macro
Browse files Browse the repository at this point in the history
The THERMAL_TRIPS_NONE is equal to -1, it is pointless to do a
conversion in this function.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Thara Gopinath <thara.gopinath@linaro.org>
Link: https://lore.kernel.org/r/20201214233811.485669-3-daniel.lezcano@linaro.org
  • Loading branch information
Daniel Lezcano committed Jan 19, 2021
1 parent a20b995 commit 53f04ca
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/thermal/thermal_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,10 +875,7 @@ trip_point_show(struct device *dev, struct device_attribute *attr, char *buf)
instance =
container_of(attr, struct thermal_instance, attr);

if (instance->trip == THERMAL_TRIPS_NONE)
return sprintf(buf, "-1\n");
else
return sprintf(buf, "%d\n", instance->trip);
return sprintf(buf, "%d\n", instance->trip);
}

ssize_t
Expand Down

0 comments on commit 53f04ca

Please sign in to comment.