From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C56BC433E6 for ; Tue, 12 Jan 2021 00:48:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1447422D58 for ; Tue, 12 Jan 2021 00:48:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404785AbhALAZB (ORCPT ); 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-Google-Smtp-Source: ABdhPJwARI7XlKp+saf8vwkHa28PhErKDJFPLfMlYUrC90/EGDll/IMwejNtlaRVO2ODqOA73ccF3Q== 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