Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3387866imw; Mon, 18 Jul 2022 07:15:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tupwWvQVmKEJE7ofgc6iZVF8KPAv/xW42DgROODHfdtEATN2xIW7eRBacsqDSTjsrksXO1 X-Received: by 2002:a05:6402:51ca:b0:43a:df65:d180 with SMTP id r10-20020a05640251ca00b0043adf65d180mr37639644edd.255.1658153745449; Mon, 18 Jul 2022 07:15:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658153745; cv=none; d=google.com; s=arc-20160816; b=gfO/C3CRDBg1MedsKroU1jNBjAxSb1uH7Wg9MDV5Nql6/OhCZj1QYrGr9WnYSKPD6b 3zr0gNwcowW+5GMpINyNRnuj9wvtgkXJ9ikCx5gqbRhb1qOkd4JhFQ7twivjs6oonlJm zEDIWQR/via19ffm0FnDMmfWguY2n2PlzdlBrEzy5E430fMbZeYV24r0DWqKO+QTgd3x tK3n2q48fykMUJB5zf0TSfdba8lbwYbW6RN0TxtJC/ODt6lRqLaajuLAfB0fULPcJ+Xt xLN37xnbw2VsO1RgmzEXBDaWHo2Omoc7t7iuNJSQBuv9fomk1flNOQzoxt/BeEsRyKp2 Wx1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=/WttLzw94XQkCQWodug0xdDBqbm5qnEWCGk1phYboOA=; b=gOWtUEYtJBjxm+c9WHshO/qHrW4tvVZUE3O+Fr9wmbrHFgK5Z8tsxIbpp9JvQHV2gK 7HBAWrwt+6fG869UWHl2ygdtXh3JgVbJDpMTcCBspipyfm3CkjsSX+SYAYL9EFms4TkX QVAX6JK+UPMrlUQxOMvg/MQiZQaJSr31OD4XQMQlG6mZkx9bu0bPZc/2z2JKZPzYkCFF OhJng27CLxa22Cc/tgNtYy8p4Y9d9ImoeWFZuoDmMCK2A5zkaHV788GvMHmN2XrJEHpO 8kpY7mXv/CLqlBtJUh1yv25tGpT2FZTKPqQxRq7clU0pp45PoFRCOB+ws3K+QxF9I2/3 5Ysg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L1ps4mla; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eq23-20020a056402299700b0042e139a8248si8232020edb.311.2022.07.18.07.15.21; Mon, 18 Jul 2022 07:15:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L1ps4mla; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S234731AbiGROE5 (ORCPT + 99 others); Mon, 18 Jul 2022 10:04:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233670AbiGROE4 (ORCPT ); Mon, 18 Jul 2022 10:04:56 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B684635E for ; Mon, 18 Jul 2022 07:04:55 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id bu1so17192706wrb.9 for ; Mon, 18 Jul 2022 07:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=/WttLzw94XQkCQWodug0xdDBqbm5qnEWCGk1phYboOA=; b=L1ps4mlah3U0D4p1OSfLazp+LQ5WIvllYV6mhGgUoiz60a5DiZPNc0x1mBtg5t3wRP hlBCmRuJwxdi1f/BsTGiG2Whlx0DaYX6S8CWObZx90FKG/YTiyXi5ry1wkpiCb/FSKhC /5IyzNl6P1/O+Urqklm3DpQ40lnFZKKwu6otsfN8fs3K5HpkY43i6K52irKEUz7/N+zb +pWgI03DjiZu3YqbSqr7lpxdeu7pxiDdg7bFG/x7GNmknYVe21TJ/nnoRW04ktKTAnLe gPCTm6tLBPQxfNFDP3tNz9kUnyspk3ZlYEBUmeyhQhbX5fxKANvMM+Dli3165c9gr66C bfUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=/WttLzw94XQkCQWodug0xdDBqbm5qnEWCGk1phYboOA=; b=P7+VV/84KL40qnghU+XtaFdcmNVqBZxfqjrsxOx4XBWI5cxxYyTkjCMtAVCIjXJF80 V5OMwyMZw773Hw/Mi6EuyVs8+Pj7XlqEzDSm6vogErifLxpq5SCtnb72ci1Am1yXv/AQ 7HLsmVv2tpJ66gYUmz1YyRKC7x5G7031IurFZI3fnwKT4byoJDhnR7oLb/tlU8CwUaPT ZqzactkHVEG4FaVxvAtpJXhSsesZ/tD/UaIzf5Jb9OwdX4w2v0VyVB+SUMStsxuNYiom NhUFMZ3DFeeGcPYVPp1qqaFxK71AwjvDQXTDSTJmlNNxonF4HAFBE6/6SKgLi9fNSCaa v1Kg== X-Gm-Message-State: AJIora/g4rb8tfzb7+iTbXwPkfl/YuNzFyZPySuBKi3HTD8HEUZTkBZT ihoEzdSrID1KmEW5riOjlAvlVg== X-Received: by 2002:adf:dd0d:0:b0:21d:666b:298e with SMTP id a13-20020adfdd0d000000b0021d666b298emr23410128wrm.412.1658153093631; Mon, 18 Jul 2022 07:04:53 -0700 (PDT) Received: from ?IPV6:2a05:6e02:1041:c10:496e:2d41:fd5a:4e5e? ([2a05:6e02:1041:c10:496e:2d41:fd5a:4e5e]) by smtp.googlemail.com with ESMTPSA id be9-20020a05600c1e8900b003a30cfb859asm14446695wmb.5.2022.07.18.07.04.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Jul 2022 07:04:52 -0700 (PDT) Message-ID: <70a992e3-bf1c-0c33-c122-3c4730ffb232@linaro.org> Date: Mon, 18 Jul 2022 16:04:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v3 2/4] thermal/core: Avoid calling ->get_trip_temp() unnecessarily Content-Language: en-US To: Zhang Rui , rafael@kernel.org Cc: quic_manafm@quicinc.com, amitk@kernel.org, lukasz.luba@arm.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220715210911.714479-1-daniel.lezcano@linaro.org> <20220715210911.714479-2-daniel.lezcano@linaro.org> From: Daniel Lezcano In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/07/2022 06:59, Zhang Rui wrote: > On Fri, 2022-07-15 at 23:09 +0200, Daniel Lezcano wrote: >> As the trip temperature is already available when calling the >> function >> handle_critical_trips(), pass it as a parameter instead of having >> this >> function calling the ops again to retrieve the same data. >> >> Reviewed-by: Lukasz Luba >> Signed-off-by: Daniel Lezcano >> --- >>   v3: >>    - Massaged the patch title and the description >> --- >>  drivers/thermal/thermal_core.c | 8 ++------ >>  1 file changed, 2 insertions(+), 6 deletions(-) >> >> diff --git a/drivers/thermal/thermal_core.c >> b/drivers/thermal/thermal_core.c >> index d9f771b15ed8..f66036b3daae 100644 >> --- a/drivers/thermal/thermal_core.c >> +++ b/drivers/thermal/thermal_core.c >> @@ -340,12 +340,8 @@ void thermal_zone_device_critical(struct >> thermal_zone_device *tz) >>  EXPORT_SYMBOL(thermal_zone_device_critical); >> >>  static void handle_critical_trips(struct thermal_zone_device *tz, >> -                                 int trip, enum thermal_trip_type >> trip_type) >> +                                 int trip, int trip_temp, enum >> thermal_trip_type trip_type) > > This indent cleanup belongs to patch 1/4. It is not an indent cleanup, the 'int trip_temp' is added in the parameters. > Other than that, > > Reviewed-by: Zhang Rui [ ... ] -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog