From: Daniel Lezcano Date: Mon, 14 Dec 2020 23:38:06 +0000 (+0100) Subject: thermal/core: Remove pointless test with the THERMAL_TRIPS_NONE macro X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=53f04ca8153cc043cd2fa968ed451a85e8f70bd8;p=linux.git thermal/core: Remove pointless test with the THERMAL_TRIPS_NONE macro The THERMAL_TRIPS_NONE is equal to -1, it is pointless to do a conversion in this function. Signed-off-by: Daniel Lezcano Reviewed-by: Thara Gopinath Link: https://lore.kernel.org/r/20201214233811.485669-3-daniel.lezcano@linaro.org --- diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c index 4e7f9e880d761..345917a58f2fd 100644 --- a/drivers/thermal/thermal_sysfs.c +++ b/drivers/thermal/thermal_sysfs.c @@ -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