* [PATCH 2.6.30-rc4] thermal: fix off-by-1 error in trip point trigger condition
@ 2009-05-06 17:34 Vladimir Zajac
2009-05-07 0:48 ` Zhang Rui
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Vladimir Zajac @ 2009-05-06 17:34 UTC (permalink / raw)
To: rui.zhang; +Cc: linux-acpi, linux-kernel
This patch fixes a regression caused by commit
b1569e99c795bf83b4ddf41c4f1c42761ab7f75e
"ACPI: move thermal trip handling to generic thermal layer"
which accidentally changed trip point trigger condition to
temp > trip_temp
This patch changes the trigger condition back to
temp >= trip_temp
Signed-off-by: Vladimir Zajac <eightgraph@gmail.com>
---
thermal_sys.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- linux-2.6.30-rc4/drivers/thermal/thermal_sys.c 2009-04-30 23:52:59.000000000 +0200
+++ linux-2.6.30-rc4-p1/drivers/thermal/thermal_sys.c 2009-05-04 19:58:30.000000000 +0200
@@ -961,7 +961,7 @@ void thermal_zone_device_update(struct t
switch (trip_type) {
case THERMAL_TRIP_CRITICAL:
- if (temp > trip_temp) {
+ if (temp >= trip_temp) {
if (tz->ops->notify)
ret = tz->ops->notify(tz, count,
trip_type);
@@ -974,7 +974,7 @@ void thermal_zone_device_update(struct t
}
break;
case THERMAL_TRIP_HOT:
- if (temp > trip_temp)
+ if (temp >= trip_temp)
if (tz->ops->notify)
tz->ops->notify(tz, count, trip_type);
break;
@@ -986,14 +986,14 @@ void thermal_zone_device_update(struct t
cdev = instance->cdev;
- if (temp > trip_temp)
+ if (temp >= trip_temp)
cdev->ops->set_cur_state(cdev, 1);
else
cdev->ops->set_cur_state(cdev, 0);
}
break;
case THERMAL_TRIP_PASSIVE:
- if (temp > trip_temp || tz->passive)
+ if (temp >= trip_temp || tz->passive)
thermal_zone_device_passive(tz, temp,
trip_temp, count);
break;
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 2.6.30-rc4] thermal: fix off-by-1 error in trip point trigger condition
2009-05-06 17:34 [PATCH 2.6.30-rc4] thermal: fix off-by-1 error in trip point trigger condition Vladimir Zajac
@ 2009-05-07 0:48 ` Zhang Rui
2009-05-10 9:54 ` Vladimir Zajac
2009-05-14 17:39 ` Len Brown
2009-06-09 13:10 ` Thomas Renninger
2 siblings, 1 reply; 6+ messages in thread
From: Zhang Rui @ 2009-05-07 0:48 UTC (permalink / raw)
To: Vladimir Zajac; +Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
On Thu, 2009-05-07 at 01:34 +0800, Vladimir Zajac wrote:
> This patch fixes a regression caused by commit
> b1569e99c795bf83b4ddf41c4f1c42761ab7f75e
> "ACPI: move thermal trip handling to generic thermal layer"
> which accidentally changed trip point trigger condition to
> temp > trip_temp
>
> This patch changes the trigger condition back to
> temp >= trip_temp
>
> Signed-off-by: Vladimir Zajac <eightgraph@gmail.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>
> ---
>
> thermal_sys.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> --- linux-2.6.30-rc4/drivers/thermal/thermal_sys.c 2009-04-30 23:52:59.000000000 +0200
> +++ linux-2.6.30-rc4-p1/drivers/thermal/thermal_sys.c 2009-05-04 19:58:30.000000000 +0200
> @@ -961,7 +961,7 @@ void thermal_zone_device_update(struct t
>
> switch (trip_type) {
> case THERMAL_TRIP_CRITICAL:
> - if (temp > trip_temp) {
> + if (temp >= trip_temp) {
> if (tz->ops->notify)
> ret = tz->ops->notify(tz, count,
> trip_type);
> @@ -974,7 +974,7 @@ void thermal_zone_device_update(struct t
> }
> break;
> case THERMAL_TRIP_HOT:
> - if (temp > trip_temp)
> + if (temp >= trip_temp)
> if (tz->ops->notify)
> tz->ops->notify(tz, count, trip_type);
> break;
> @@ -986,14 +986,14 @@ void thermal_zone_device_update(struct t
>
> cdev = instance->cdev;
>
> - if (temp > trip_temp)
> + if (temp >= trip_temp)
> cdev->ops->set_cur_state(cdev, 1);
> else
> cdev->ops->set_cur_state(cdev, 0);
> }
> break;
> case THERMAL_TRIP_PASSIVE:
> - if (temp > trip_temp || tz->passive)
> + if (temp >= trip_temp || tz->passive)
> thermal_zone_device_passive(tz, temp,
> trip_temp, count);
> break;
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 2.6.30-rc4] thermal: fix off-by-1 error in trip point trigger condition
2009-05-07 0:48 ` Zhang Rui
@ 2009-05-10 9:54 ` Vladimir Zajac
0 siblings, 0 replies; 6+ messages in thread
From: Vladimir Zajac @ 2009-05-10 9:54 UTC (permalink / raw)
To: linux-acpi@vger.kernel.org
Cc: Zhang Rui, linux-kernel@vger.kernel.org, Matthew Garrett
On Thursday 07 May 2009 02:48:00 Zhang Rui wrote:
> On Thu, 2009-05-07 at 01:34 +0800, Vladimir Zajac wrote:
> > This patch fixes a regression caused by commit
> > b1569e99c795bf83b4ddf41c4f1c42761ab7f75e
> > "ACPI: move thermal trip handling to generic thermal layer"
> > which accidentally changed trip point trigger condition to
> > temp > trip_temp
> >
> > This patch changes the trigger condition back to
> > temp >= trip_temp
> >
> > Signed-off-by: Vladimir Zajac <eightgraph@gmail.com>
>
> Acked-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Matthew Garrett <mjg@redhat.com>
> > ---
> >
> > thermal_sys.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > --- linux-2.6.30-rc4/drivers/thermal/thermal_sys.c 2009-04-30 23:52:59.000000000 +0200
> > +++ linux-2.6.30-rc4-p1/drivers/thermal/thermal_sys.c 2009-05-04 19:58:30.000000000 +0200
> > @@ -961,7 +961,7 @@ void thermal_zone_device_update(struct t
> >
> > switch (trip_type) {
> > case THERMAL_TRIP_CRITICAL:
> > - if (temp > trip_temp) {
> > + if (temp >= trip_temp) {
> > if (tz->ops->notify)
> > ret = tz->ops->notify(tz, count,
> > trip_type);
> > @@ -974,7 +974,7 @@ void thermal_zone_device_update(struct t
> > }
> > break;
> > case THERMAL_TRIP_HOT:
> > - if (temp > trip_temp)
> > + if (temp >= trip_temp)
> > if (tz->ops->notify)
> > tz->ops->notify(tz, count, trip_type);
> > break;
> > @@ -986,14 +986,14 @@ void thermal_zone_device_update(struct t
> >
> > cdev = instance->cdev;
> >
> > - if (temp > trip_temp)
> > + if (temp >= trip_temp)
> > cdev->ops->set_cur_state(cdev, 1);
> > else
> > cdev->ops->set_cur_state(cdev, 0);
> > }
> > break;
> > case THERMAL_TRIP_PASSIVE:
> > - if (temp > trip_temp || tz->passive)
> > + if (temp >= trip_temp || tz->passive)
> > thermal_zone_device_passive(tz, temp,
> > trip_temp, count);
> > break;
Forwarding Matthew Garrett's reply from another thread:
> Looks good. You probably need to resend it with a Signed-off-by: line,
> but feel free to add
>
> Acked-by: Matthew Garrett <mjg@redhat.com>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6.30-rc4] thermal: fix off-by-1 error in trip point trigger condition
2009-05-06 17:34 [PATCH 2.6.30-rc4] thermal: fix off-by-1 error in trip point trigger condition Vladimir Zajac
2009-05-07 0:48 ` Zhang Rui
@ 2009-05-14 17:39 ` Len Brown
2009-06-09 13:10 ` Thomas Renninger
2 siblings, 0 replies; 6+ messages in thread
From: Len Brown @ 2009-05-14 17:39 UTC (permalink / raw)
To: Vladimir Zajac; +Cc: rui.zhang, linux-acpi, linux-kernel
applied
thanks,
Len Brown, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6.30-rc4] thermal: fix off-by-1 error in trip point trigger condition
2009-05-06 17:34 [PATCH 2.6.30-rc4] thermal: fix off-by-1 error in trip point trigger condition Vladimir Zajac
2009-05-07 0:48 ` Zhang Rui
2009-05-14 17:39 ` Len Brown
@ 2009-06-09 13:10 ` Thomas Renninger
2009-06-09 17:06 ` Vladimir Zajac
2 siblings, 1 reply; 6+ messages in thread
From: Thomas Renninger @ 2009-06-09 13:10 UTC (permalink / raw)
To: Vladimir Zajac; +Cc: rui.zhang, linux-acpi, linux-kernel
On Wednesday 06 May 2009 19:34:21 Vladimir Zajac wrote:
> This patch fixes a regression caused by commit
> b1569e99c795bf83b4ddf41c4f1c42761ab7f75e
> "ACPI: move thermal trip handling to generic thermal layer"
> which accidentally changed trip point trigger condition to
> temp > trip_temp
>
> This patch changes the trigger condition back to
> temp >= trip_temp
>
> Signed-off-by: Vladimir Zajac <eightgraph@gmail.com>
This one should have
CC: stable@kernel.org
added.
Vladimir, do you mind submitting this one for stable inclusion
if not done already.
Thanks,
Thomas
> ---
>
> thermal_sys.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> --- linux-2.6.30-rc4/drivers/thermal/thermal_sys.c 2009-04-30
23:52:59.000000000 +0200
> +++ linux-2.6.30-rc4-p1/drivers/thermal/thermal_sys.c 2009-05-04
19:58:30.000000000 +0200
> @@ -961,7 +961,7 @@ void thermal_zone_device_update(struct t
>
> switch (trip_type) {
> case THERMAL_TRIP_CRITICAL:
> - if (temp > trip_temp) {
> + if (temp >= trip_temp) {
> if (tz->ops->notify)
> ret = tz->ops->notify(tz, count,
> trip_type);
> @@ -974,7 +974,7 @@ void thermal_zone_device_update(struct t
> }
> break;
> case THERMAL_TRIP_HOT:
> - if (temp > trip_temp)
> + if (temp >= trip_temp)
> if (tz->ops->notify)
> tz->ops->notify(tz, count, trip_type);
> break;
> @@ -986,14 +986,14 @@ void thermal_zone_device_update(struct t
>
> cdev = instance->cdev;
>
> - if (temp > trip_temp)
> + if (temp >= trip_temp)
> cdev->ops->set_cur_state(cdev, 1);
> else
> cdev->ops->set_cur_state(cdev, 0);
> }
> break;
> case THERMAL_TRIP_PASSIVE:
> - if (temp > trip_temp || tz->passive)
> + if (temp >= trip_temp || tz->passive)
> thermal_zone_device_passive(tz, temp,
> trip_temp, count);
> break;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-
acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 2.6.30-rc4] thermal: fix off-by-1 error in trip point trigger condition
2009-06-09 13:10 ` Thomas Renninger
@ 2009-06-09 17:06 ` Vladimir Zajac
0 siblings, 0 replies; 6+ messages in thread
From: Vladimir Zajac @ 2009-06-09 17:06 UTC (permalink / raw)
To: Thomas Renninger; +Cc: rui.zhang, linux-acpi, linux-kernel
On Tuesday 09 June 2009 15:10:10 Thomas Renninger wrote:
> This one should have
> CC: stable@kernel.org
> added.
> Vladimir, do you mind submitting this one for stable inclusion
> if not done already.
>
Inclusion into stable is not needed.
The bug was introduced in 2.6.30-rc1, stable release is not affected.
Vladimir
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-06-09 17:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-06 17:34 [PATCH 2.6.30-rc4] thermal: fix off-by-1 error in trip point trigger condition Vladimir Zajac
2009-05-07 0:48 ` Zhang Rui
2009-05-10 9:54 ` Vladimir Zajac
2009-05-14 17:39 ` Len Brown
2009-06-09 13:10 ` Thomas Renninger
2009-06-09 17:06 ` Vladimir Zajac
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox