Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3952423imw; Mon, 18 Jul 2022 18:16:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s6mq4kkenrsNavRGvfJZ0pQNkMb68usa43qUKIc9NZ06ZQBrVGEZH7vUuFYgw9znTEM7gH X-Received: by 2002:a17:906:ef90:b0:72b:9ce5:f016 with SMTP id ze16-20020a170906ef9000b0072b9ce5f016mr27475720ejb.697.1658193366234; Mon, 18 Jul 2022 18:16:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658193366; cv=none; d=google.com; s=arc-20160816; b=pjXcEncimC+aDouyhyBaJQP+ReZ+xl7jVUdVbqyJPewicrLCMeasRuXnOX4cCSG8ZQ DEIRP2kOfqWcKOp1BB7D65kjBdbKxPhGc2W8Fwm8p+o3z/8x/EBRtKgOMO/8Osg/FIy/ 7Kdaz7iOSDnEgT8361g9Y0dJd2aJ9XqjBcBWR2DTfFXGRk3IbBTCBr18QXKkITKAlitI viPX52bLHvDVKtFdpGX3YnXhMrhj61/Chl+col4iefvKnyu7IBzYKIxWi0Y+ifdKRaGm qkz5LcswugrlQIXwrPDzmjmaAfv0U8xSW8cYKyDfaF13TLSUHJt0L1MFM7LZL4ba9YQr Mr7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=f+oKCtf+9sEtPh+Jltu2AvrlNVaO3l9GNvtGWODslRg=; b=mYgmAbN3Th3AzSv1rVU14Ahvj5Dg+EKiVYLdWnMkyMGtcuW0DXS+EOLImgIrYyMx+x ko47TrX6SQj930FztGkJXqluCOEW4JsT+7z15fI0cvBSdN0pXQQbdIJxFJJSJcSyqeo5 47V9M1QhxcjE0GEfDiv2UxeIfeQLB3F6iEruhep6UkcJzOiwlTtpxIAJn2kkjQUzjC3u 5nKdo4W97f3FfBOp7aq/yHiyrDF/NqizTBAApdTrsp0sXxcS1tWxTQkfeIxjlqTjfC4f PTKYOty31UBwkjBE8DTADlTYmThm2Lz1D5A4FZED/3VXiWfUyjuKsFTJzVGujBUy7P2H vQtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IT3Cn5+p; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sh36-20020a1709076ea400b0072f136ddbc2si11899819ejc.473.2022.07.18.18.15.41; Mon, 18 Jul 2022 18:16:06 -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=@intel.com header.s=Intel header.b=IT3Cn5+p; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234637AbiGSBBH (ORCPT + 99 others); Mon, 18 Jul 2022 21:01:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbiGSBBH (ORCPT ); Mon, 18 Jul 2022 21:01:07 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1BCD60C3; Mon, 18 Jul 2022 18:01:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658192465; x=1689728465; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=f+oKCtf+9sEtPh+Jltu2AvrlNVaO3l9GNvtGWODslRg=; b=IT3Cn5+pXKtFTZAXvLe4q06JtwwyTqhqqralycGTXuqL7SGdtLno6tv0 HIbDiNIQOCPf5cpsYxXUlQ8VKeyneX4h4cJXCwTVI1M7D1O3y2wud8+0/ jgdexvF/ELhnzzHsQnb12HmIyYaIWesG118IIlioIFHenlLh5lgldt+x4 DNL1745eptAL7WNaqQtPcrQaCV+klKhfIGx5fc/lsRSxXqDA1ffiW15y0 7xlbDphYhosZwMWjEiK11uqFPzVsGF3XvipzsTfZV249mn7KW2nE825mn 24PRkPqHZ/L73MY3naHEvW+pQHMSFmiDVklUE9ilx/VqAza752kG/TWvM g==; X-IronPort-AV: E=McAfee;i="6400,9594,10412"; a="350320153" X-IronPort-AV: E=Sophos;i="5.92,282,1650956400"; d="scan'208";a="350320153" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2022 18:01:05 -0700 X-IronPort-AV: E=Sophos;i="5.92,282,1650956400"; d="scan'208";a="724066804" Received: from dukechan-mobl.gar.corp.intel.com ([10.215.250.179]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2022 18:01:01 -0700 Message-ID: <4063f7c1933c02f3681832f522a41e1bb5229f41.camel@intel.com> Subject: Re: [PATCH v3 2/4] thermal/core: Avoid calling ->get_trip_temp() unnecessarily From: Zhang Rui To: Daniel Lezcano , 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 Date: Tue, 19 Jul 2022 09:01:03 +0800 In-Reply-To: <70a992e3-bf1c-0c33-c122-3c4730ffb232@linaro.org> References: <20220715210911.714479-1-daniel.lezcano@linaro.org> <20220715210911.714479-2-daniel.lezcano@linaro.org> <70a992e3-bf1c-0c33-c122-3c4730ffb232@linaro.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.1-0ubuntu1 MIME-Version: 1.0 X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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 Mon, 2022-07-18 at 16:04 +0200, Daniel Lezcano wrote: > 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. > > >=20 > > > Reviewed-by: Lukasz Luba > > > Signed-off-by: Daniel Lezcano > > > --- > > > =C2=A0=C2=A0 v3: > > > =C2=A0=C2=A0=C2=A0 - Massaged the patch title and the description > > > --- > > > =C2=A0=C2=A0drivers/thermal/thermal_core.c | 8 ++------ > > > =C2=A0=C2=A01 file changed, 2 insertions(+), 6 deletions(-) > > >=20 > > > 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) > > > =C2=A0=C2=A0EXPORT_SYMBOL(thermal_zone_device_critical); > > > =C2=A0=20 > > > =C2=A0=C2=A0static void handle_critical_trips(struct thermal_zone_dev= ice > > > *tz, > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 int trip, enum > > > thermal_trip_type > > > trip_type) > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 int trip, int trip_temp= , enum > > > thermal_trip_type trip_type) > >=20 > > This indent cleanup belongs to patch 1/4. >=20 > It is not an indent cleanup, the 'int trip_temp' is added in the > parameters. Sorry, I meant the indent cleanup in Patch 3/4 can be moved to 2/4. thanks, rui >=20 > > Other than that, > >=20 > > Reviewed-by: Zhang Rui >=20 > [ ... ] >=20 >=20