Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753842AbbKYHQW (ORCPT ); Wed, 25 Nov 2015 02:16:22 -0500 Received: from mga14.intel.com ([192.55.52.115]:26961 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752977AbbKYHQU (ORCPT ); Wed, 25 Nov 2015 02:16:20 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,341,1444719600"; d="scan'208";a="828574409" From: "Chen, Yu C" To: "edubezval@gmail.com" CC: "Zhang, Rui" , "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" , "linux-acpi@vger.kernel.org" Subject: Re: [PATCH 1/1] thermal: setup monitor only once after handling trips Thread-Topic: [PATCH 1/1] thermal: setup monitor only once after handling trips Thread-Index: AQHRJzcEVYNjQe9jykCggHLdNKxHfp6rzm4A Date: Wed, 25 Nov 2015 07:16:08 +0000 Message-ID: <1448435910.15712.22.camel@localhost> References: <1448424468-18736-1-git-send-email-edubezval@gmail.com> In-Reply-To: <1448424468-18736-1-git-send-email-edubezval@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.160.87] Content-Type: text/plain; charset="utf-8" Content-ID: <2C1456D83D585F41AB728841003DDE10@intel.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id tAP7GQLS026504 Content-Length: 1692 Lines: 50 Hi, On Tue, 2015-11-24 at 20:07 -0800, Eduardo Valentin wrote: > Instead of changing the monitoring setup every time after > handling each trip, this patch simplifies the monitoring > setup by moving the setup call to a place where all > trips have been treated already. > > Cc: Zhang Rui > Cc: linux-pm@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Eduardo Valentin > --- > drivers/thermal/thermal_core.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c > index d9e525c..6debb54 100644 > --- a/drivers/thermal/thermal_core.c > +++ b/drivers/thermal/thermal_core.c > @@ -457,11 +457,6 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip) > handle_critical_trips(tz, trip, type); > else > handle_non_critical_trips(tz, trip, type); > - /* > - * Alright, we handled this trip successfully. > - * So, start monitoring again. > - */ > - monitor_thermal_zone(tz); > } > > /** > @@ -547,6 +542,12 @@ void thermal_zone_device_update(struct thermal_zone_device *tz) > > for (count = 0; count < tz->trips; count++) > handle_thermal_trip(tz, count); > + > + /* > + * Alright, we handled this trip successfully. s/these trips ? > + * So, start monitoring again. > + */ > + monitor_thermal_zone(tz); > } > EXPORT_SYMBOL_GPL(thermal_zone_device_update); > BTW, thermal_notify_framework might need be affected? thanks, Yu ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?