All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Chen, Yu C" <yu.c.chen@intel.com>
To: "edubezval@gmail.com" <edubezval@gmail.com>
Cc: "Zhang, Rui" <rui.zhang@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH 1/1] thermal: setup monitor only once after handling trips
Date: Wed, 25 Nov 2015 07:16:08 +0000	[thread overview]
Message-ID: <1448435910.15712.22.camel@localhost> (raw)
In-Reply-To: <1448424468-18736-1-git-send-email-edubezval@gmail.com>

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 <rui.zhang@intel.com>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
> ---
>  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

WARNING: multiple messages have this Message-ID (diff)
From: "Chen, Yu C" <yu.c.chen@intel.com>
To: "edubezval@gmail.com" <edubezval@gmail.com>
Cc: "Zhang, Rui" <rui.zhang@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH 1/1] thermal: setup monitor only once after handling trips
Date: Wed, 25 Nov 2015 07:16:08 +0000	[thread overview]
Message-ID: <1448435910.15712.22.camel@localhost> (raw)
In-Reply-To: <1448424468-18736-1-git-send-email-edubezval@gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1692 bytes --]

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 <rui.zhang@intel.com>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
> ---
>  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Ç+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

  reply	other threads:[~2015-11-25  7:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25  4:07 [PATCH 1/1] thermal: setup monitor only once after handling trips Eduardo Valentin
2015-11-25  7:16 ` Chen, Yu C [this message]
2015-11-25  7:16   ` Chen, Yu C
2015-11-30 19:10   ` Eduardo Valentin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1448435910.15712.22.camel@localhost \
    --to=yu.c.chen@intel.com \
    --cc=edubezval@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.