Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1280213

Re: [PATCH 1/1] thermal: setup monitor only once after handling trips

From Eduardo Valentin <edubezval@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/1] thermal: setup monitor only once after handling trips
Date 2015-11-30 20:20 +0100
Message-ID <qAC9r-7Fj-5@gated-at.bofh.it> (permalink)
References <qyzz3-XW-1@gated-at.bofh.it> <qyCwW-2WA-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 1/1] thermal: setup monitor only once after handling trips Eduardo Valentin <edubezval@gmail.com> - 2015-11-25 05:10 +0100
  Re: [PATCH 1/1] thermal: setup monitor only once after handling  trips "Chen, Yu C" <yu.c.chen@intel.com> - 2015-11-25 08:20 +0100
    Re: [PATCH 1/1] thermal: setup monitor only once after handling trips Eduardo Valentin <edubezval@gmail.com> - 2015-11-30 20:20 +0100

csiph-web