From: Eduardo Valentin <eduardo.valentin@ti.com>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Zhang Rui <rui.zhang@intel.com>,
eduardo.valentin@ti.com
Subject: Re: [PATCH] thermal: step_wise: cdev only needs update on a new target state
Date: Wed, 29 May 2013 18:11:51 -0400 [thread overview]
Message-ID: <51A67D27.9050502@ti.com> (raw)
In-Reply-To: <1369724148-15087-1-git-send-email-shawn.guo@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1325 bytes --]
Rui,
On 28-05-2013 02:55, Shawn Guo wrote:
> The cooling device only needs update on a new target state. Since we
> already check old target in thermal_zone_trip_update(), we can do one
> more check to see if it's a new target state. If not, we can reasonably
> save some uncecesary code execution.
>
typo above:
s/uncecesary/unnecessary
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
A part from the above typo, I believe we must have this change in:
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
> drivers/thermal/step_wise.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/thermal/step_wise.c b/drivers/thermal/step_wise.c
> index 4d4ddae..0afbd86 100644
> --- a/drivers/thermal/step_wise.c
> +++ b/drivers/thermal/step_wise.c
> @@ -133,6 +133,9 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip)
> old_target = instance->target;
> instance->target = get_target_state(instance, trend, throttle);
>
> + if (old_target == instance->target)
> + continue;
> +
> /* Activate a passive thermal instance */
> if (old_target == THERMAL_NO_TARGET &&
> instance->target != THERMAL_NO_TARGET)
>
--
You have got to be excited about what you are doing. (L. Lamport)
Eduardo Valentin
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 295 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: eduardo.valentin@ti.com (Eduardo Valentin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] thermal: step_wise: cdev only needs update on a new target state
Date: Wed, 29 May 2013 18:11:51 -0400 [thread overview]
Message-ID: <51A67D27.9050502@ti.com> (raw)
In-Reply-To: <1369724148-15087-1-git-send-email-shawn.guo@linaro.org>
Rui,
On 28-05-2013 02:55, Shawn Guo wrote:
> The cooling device only needs update on a new target state. Since we
> already check old target in thermal_zone_trip_update(), we can do one
> more check to see if it's a new target state. If not, we can reasonably
> save some uncecesary code execution.
>
typo above:
s/uncecesary/unnecessary
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
A part from the above typo, I believe we must have this change in:
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
> drivers/thermal/step_wise.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/thermal/step_wise.c b/drivers/thermal/step_wise.c
> index 4d4ddae..0afbd86 100644
> --- a/drivers/thermal/step_wise.c
> +++ b/drivers/thermal/step_wise.c
> @@ -133,6 +133,9 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip)
> old_target = instance->target;
> instance->target = get_target_state(instance, trend, throttle);
>
> + if (old_target == instance->target)
> + continue;
> +
> /* Activate a passive thermal instance */
> if (old_target == THERMAL_NO_TARGET &&
> instance->target != THERMAL_NO_TARGET)
>
--
You have got to be excited about what you are doing. (L. Lamport)
Eduardo Valentin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 295 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130529/34c0cea2/attachment.sig>
next prev parent reply other threads:[~2013-05-29 22:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-28 6:55 [PATCH] thermal: step_wise: cdev only needs update on a new target state Shawn Guo
2013-05-28 6:55 ` Shawn Guo
2013-05-29 22:11 ` Eduardo Valentin [this message]
2013-05-29 22:11 ` 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=51A67D27.9050502@ti.com \
--to=eduardo.valentin@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
--cc=shawn.guo@linaro.org \
/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.