* [PATCH 1/1] thermal: setup monitor only once after handling trips
@ 2015-11-25 4:07 Eduardo Valentin
2015-11-25 7:16 ` Chen, Yu C
0 siblings, 1 reply; 3+ messages in thread
From: Eduardo Valentin @ 2015-11-25 4:07 UTC (permalink / raw)
To: Rui Zhang; +Cc: LKML, Linux ACPI, Eduardo Valentin, linux-pm
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.
+ * So, start monitoring again.
+ */
+ monitor_thermal_zone(tz);
}
EXPORT_SYMBOL_GPL(thermal_zone_device_update);
--
2.5.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] thermal: setup monitor only once after handling trips
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
2015-11-30 19:10 ` Eduardo Valentin
0 siblings, 1 reply; 3+ messages in thread
From: Chen, Yu C @ 2015-11-25 7:16 UTC (permalink / raw)
To: edubezval@gmail.com
Cc: Zhang, Rui, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] thermal: setup monitor only once after handling trips
2015-11-25 7:16 ` Chen, Yu C
@ 2015-11-30 19:10 ` Eduardo Valentin
0 siblings, 0 replies; 3+ messages in thread
From: Eduardo Valentin @ 2015-11-30 19:10 UTC (permalink / raw)
To: Chen, Yu C
Cc: Zhang, Rui, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org
On Wed, Nov 25, 2015 at 07:16:08AM +0000, Chen, Yu C wrote:
> 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 ?
Yeah, I can amend this.
> > + * So, start monitoring again.
> > + */
> > + monitor_thermal_zone(tz);
> > }
> > EXPORT_SYMBOL_GPL(thermal_zone_device_update);
> >
> BTW, thermal_notify_framework might need be affected?
Well, the original code does not call thermal_notify_framework. Calling
it would require a different patch. This one is just to simplify the
monitoring setup.
BR,
>
> thanks,
> Yu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-30 19:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2015-11-30 19:10 ` Eduardo Valentin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).