Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3031733pxu; Mon, 14 Dec 2020 18:35:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbU4C4NIU/SM16tTzetjvzDwKowpYCbCI2CUJZNrOrxVeh3w+C5C9HNvU2g8rAdecZg/dD X-Received: by 2002:a17:907:a8a:: with SMTP id by10mr24666454ejc.423.1607999703512; Mon, 14 Dec 2020 18:35:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607999703; cv=none; d=google.com; s=arc-20160816; b=ng0mlclGtw3byaSApxJ+TpDwOS6ZhOmIW3UM08PQAGhKqKnvE9kiXuh7pzQ6+8LVha v/81QDv3+fakBWL1TEyEi5aTx5OhIFKKhAWG8TqUcZQnFZcmIurss1YqgppD3muPgz7U VWMz6KhgAfIfcAZSzPZwZCl754h1XYrmtRXm/SwwNAcm0gXttguERssTdmhWwPYyOCFY RQNahEahPrWaCilf2H5j8lRe1CwyYbkCv/dmEg9g7v2Ceo7WVBCAa8+cGnwCrdgUraEe Qk59JXUCQOr+rKTCScAv76KhRwk+78LlWmgUR9MbClNtdRr5VCun9ZONNHsJOKfKF/La 1jEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Vw6zXAVb14wYNaSbzDr0/nxXdw6EsBX7NJU8sXRM6aI=; b=jXRdSBRntTKipUHy19BjSLxvmhKfGIcX6uYEkZ82CN+2Xce+YpVcr4A+3g4ubp5weO O1jDKAfnlfBTt3uFe1k9BLpYhsVupdQr/+n5HMw9/M0d3vDi9EGzNS9ILRKNBfEMAVgE ln+f10cjg7pYaXPWNqb6lLAcroqOX2RJR2nKckUZ+EJl5h6PpojvO2WMdpzV+cZektsF og3+5xkyzRnuqVO5jy8WFfCyEa52z8pGY9CRvblEZLgzBKYolG4M+3jnFSO0668+p7r3 Fun3ez65R3+1dpTsD0W/JcCEM0MlgsficomhaBb0zvCksoA4zq2FMD1EsNiVrsp0nuvl 5lCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f0g8Uw1C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y11si150174edp.516.2020.12.14.18.34.40; Mon, 14 Dec 2020 18:35:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f0g8Uw1C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727683AbgLNXmp (ORCPT + 99 others); Mon, 14 Dec 2020 18:42:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726659AbgLNXlD (ORCPT ); Mon, 14 Dec 2020 18:41:03 -0500 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8E13C061248 for ; Mon, 14 Dec 2020 15:40:01 -0800 (PST) Received: by mail-wm1-x344.google.com with SMTP id c133so3271341wme.4 for ; Mon, 14 Dec 2020 15:40:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Vw6zXAVb14wYNaSbzDr0/nxXdw6EsBX7NJU8sXRM6aI=; b=f0g8Uw1Cgwv+yIrfOsY4jCzbXBoIw7JjgtgY4EsnRINvE1qvXl5DzItAGzHfavvWmx Jek0Anymic0OdGaHMyxPP5Uw0jxtUhK6dZG5a16Mzm8Jkfgijq/Og0uYX0oMIYdZRqAS Cg3ufEp08+FpYgua4YJFKbz8GYbDkDWzUZDOHQrEW3hPRsDcxK/2Hw3BSw8jVyYOoHUe VW2sGsh7HDRnK6lpYze7a5TdkAJAr5zfoMBnIyAjhjq6TpZHM3TCznwmZgd4Zw/flG7H 8xCdoJqi3YisO6ynAePqxRm2qHhVd3qTGvMsPj8aG4SSE5oHfkvf+GIWMxtpwIkfTv1L UG+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Vw6zXAVb14wYNaSbzDr0/nxXdw6EsBX7NJU8sXRM6aI=; b=YVRXOIA6jto7v1lQZOsLsNMMVIf+yOFSdQsVL+FIk8jvVwb8fPIe9MvoHirshVr5cr FyIFtx4WC9LigdweUYl8UpCvq+0peGZTVUxUDlnK9tblv9wddHjIz5QJj8zu3VyN/+DK eRKkJ/E1tu5dFxlEATPaB+VKi3onmgwiQya4w5fgf4rZ+QxSOkf+jCwaSXEpfmiFhxnh a80qjLORP4y+Giu2x2f3RKwnocn3QT38Yp5XL9IRamwUP3VSCTE3Ubrq1sMf9JrHh1Tc w1SzlCRW92NRfDdaccfu5WICkkSMxbDMJ8b+JpbI1QvVgoSueIcgddiqRI9y2RsLTA5Y GQqg== X-Gm-Message-State: AOAM532iRzO181LFdvZBb8iMssLstk4fR5w4ceDc7IS89lPH9uD2i75H zHQTnTbbU/4nwF2ENcei83SmZA== X-Received: by 2002:a7b:cd90:: with SMTP id y16mr30789973wmj.115.1607989200619; Mon, 14 Dec 2020 15:40:00 -0800 (PST) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:e842:4086:6f24:55a6]) by smtp.gmail.com with ESMTPSA id h3sm34145075wmm.4.2020.12.14.15.39.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Dec 2020 15:39:59 -0800 (PST) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rui.zhang@intel.com Cc: mjg59@codon.org.uk, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, amitk@kernel.org, thara.gopinath@linaro.org Subject: [PATCH 3/6] thermal/core: Remove pointless test with the THERMAL_TRIPS_NONE macro Date: Tue, 15 Dec 2020 00:38:06 +0100 Message-Id: <20201214233811.485669-3-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201214233811.485669-1-daniel.lezcano@linaro.org> References: <20201214233811.485669-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The THERMAL_TRIPS_NONE is equal to -1, it is pointless to do a conversion in this function. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_sysfs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c index 4e7f9e880d76..345917a58f2f 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 -- 2.25.1