Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3418891pxb; Tue, 12 Jan 2021 14:18:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJwXWVS9HUgNjMyID1pu+QwK7LaJvDErR+bWldN3A9xUwt8n/ItI7g/BncoFqwp+uaibi5ct X-Received: by 2002:a17:906:8301:: with SMTP id j1mr645777ejx.397.1610489926215; Tue, 12 Jan 2021 14:18:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610489926; cv=none; d=google.com; s=arc-20160816; b=JBw05OMP8v1LJLgQQMzm+aXHUXd+/R0wph/qkc2+6W4CJufwcek6YZIgddx/OgS1r2 j2RzN7wfZIAxLZufQhxrxn3fvBI969rMGnH+H/sBaL2MS5He6k9ay0+alAIF6w/bnK7g X6IVvMt+Gkf8trEeolA38cKCE+sv/gZHW6CQ2DCrsCm6+XHAxMTgISTlyike7aBP4pXk WKBpIJ8A8CVHGesOcNgEQN7NAiPjLWjL4vPG5JhjfIypdADOtz57h7WAKEupDJBhUl5W 3YlX6jgeYvEHsxYFVatpIetDR9uVkmi6tiFsuxIY9NhzCV/mte9502+PzkF+SwT6C8e/ 7C8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=1SMcU2clwjDpXCJK5XGOPy9evEO2ZkmmmyeSpWnkqzo=; b=Meh1I2wDR5tj6PxeIc9qwu3nX8f2EDptw4tFJiWZy2OL9GgjQ6g3V2o+VllTuGtnL9 grR4vQS9JpocYHm8vOML2zmDShNceucAhPJFR6puzJUUo50Qs/m8XDEv5XQ7YFIHvKKu 1R/FMT+hc9nOhJ5AyiPBOOW7XLLP6jTmhiEstEv5B+ECiMwOsNNKKnjy2/jxLxcfP8g+ Un92QXjXBCV9tCCrt0lcO99ODQKX265i9cO0+JUdu/tNzNaRXSpEKtimB9jA+bTTvwDO qfxn9viG89enFNT/dzfPS1FOY26d9C5Z6+kszHTR7Mm1DHFqsCwDnXFSrJa1qR/mkHuQ p/aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L1+RTzlS; 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 ce20si39380edb.138.2021.01.12.14.18.23; Tue, 12 Jan 2021 14:18:46 -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=L1+RTzlS; 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 S2404775AbhALAZB (ORCPT + 99 others); Mon, 11 Jan 2021 19:25:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403985AbhAKXSd (ORCPT ); Mon, 11 Jan 2021 18:18:33 -0500 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50816C061786 for ; Mon, 11 Jan 2021 15:17:53 -0800 (PST) Received: by mail-io1-xd30.google.com with SMTP id y19so367648iov.2 for ; Mon, 11 Jan 2021 15:17:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=1SMcU2clwjDpXCJK5XGOPy9evEO2ZkmmmyeSpWnkqzo=; b=L1+RTzlS30PWKtGajGKUYzf3lYvzrFa1iZgpwC/oABOLEWItgwvmATS94OaMClPd08 TTC4dSMWwmGHhi4/B70+FupsHB2TmG1UExGp61spGneY6lHm/lNVlwMbe6JM1mlJBFcW pGd3Fyf5uEywv8l5QQbeSHl7nJH60J5A0TdAvTHXR7qNpFYkvY4rBX5PgFnwZ6mf6fF0 vXHGI15fPimZE/ROArLXwD6khBbCVRReOF/+jcA+tsBZlaQUGXG6JlE1gCwiYUS/YPXa crWLgPze3huQdHiou8ccnR8NaMisZDs6KBQXmyeeAMiH/wJf0tEm6goBpgQJCNCFzqUy xPrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1SMcU2clwjDpXCJK5XGOPy9evEO2ZkmmmyeSpWnkqzo=; b=ZgN148EvCGvmENpy7IiMBt1tf6Zbs2XOZmH4r4leKb4maafRL60DcnODsvdZjrCjII EGk5aGs9UFSX0jBmmFJqoNg4GrAw4XJK608Nhjl8SaE4ZiG6Rjo1hoU3mPwXaBRxt0+r zjs0ThNIEliegw6A75TcOSDyvAP0IgVYynd4PvutRaZCs99ipArALv2w82NTDST6Yw34 6OZEbqNOMwaRfkOQss39jsIfrg1MYeKE6WTj0jLjGKrg5gUlJHBo/J7+dUSujtTvWnSa H1MgGhnqGv9rN2xI0cRHHiFWVjbhWtQJXxX1IgURt3JFakRe3/quA6U6CicnMMhZyBWm +7ZQ== X-Gm-Message-State: AOAM532kKAGxgglZGiZAG10puSrpUxkquglZxboFcEz6AIcyH4RcQLP5 PlbJJXWN9m8izAOGYDr1MJlndl8ET6AemA== X-Received: by 2002:a02:6a0e:: with SMTP id l14mr1742689jac.58.1610407072636; Mon, 11 Jan 2021 15:17:52 -0800 (PST) Received: from [192.168.1.93] (pool-71-163-245-5.washdc.fios.verizon.net. [71.163.245.5]) by smtp.gmail.com with ESMTPSA id o195sm876229ila.38.2021.01.11.15.17.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Jan 2021 15:17:52 -0800 (PST) Subject: Re: [PATCH 3/6] thermal/core: Remove pointless test with the THERMAL_TRIPS_NONE macro To: Daniel Lezcano , rui.zhang@intel.com Cc: mjg59@codon.org.uk, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, amitk@kernel.org References: <20201214233811.485669-1-daniel.lezcano@linaro.org> <20201214233811.485669-3-daniel.lezcano@linaro.org> From: Thara Gopinath Message-ID: <8a7ca60c-8f94-b8e3-22d6-32ea2e00459a@linaro.org> Date: Mon, 11 Jan 2021 18:17:50 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201214233811.485669-3-daniel.lezcano@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/14/20 6:38 PM, Daniel Lezcano wrote: > The THERMAL_TRIPS_NONE is equal to -1, it is pointless to do a > conversion in this function. It is pointless because you have removed force_passive and will be removing THERMAL_TRIPS_NONE in the following patches. Maybe that should be mentioned in the commit message. Otherwise, Reviewed-by: Thara Gopinath > > 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 > -- Warm Regards Thara