public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: edubezval@gmail.com, linux-pm@vger.kernel.org
Subject: Re: [PATCH] thermal: core: ignore invalid trip temperature
Date: Thu, 20 Nov 2014 10:25:31 +0800	[thread overview]
Message-ID: <1416450331.5808.3.camel@rzhang1-toshiba> (raw)
In-Reply-To: <1415835809-23376-1-git-send-email-srinivas.pandruvada@linux.intel.com>


For some reason, I did not see the discussion between Lukasz and you via
email. I can only see it via patchwork.

Lukasz,

if the regulator for thermal unit is not enabled, what will you get?
temperature 0xFF + trip point -1? or Just temperature 0xFF?
I don't think this patch makes any difference in the second case.

BTW, if you expect some indicator when the thermal unit is not enabled,
system critical shutdown is not a proper one, we can either check the
sysfs I/F, and we can add a warning message here, telling that invalid
trip point is found.

thanks,
rui

On Wed, 2014-11-12 at 15:43 -0800, Srinivas Pandruvada wrote:
> Ignore invalid trip temperature less or equal to zero. Some
> buggy systems have invalid trips, causing system shutdown.
> 
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> Acked-by: Zhang Rui <rui.zhang@intel.com>
> ---
>  drivers/thermal/thermal_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
> index 9bf10aa..fbf301a 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -368,7 +368,7 @@ static void handle_critical_trips(struct thermal_zone_device *tz,
>  	tz->ops->get_trip_temp(tz, trip, &trip_temp);
>  
>  	/* If we have not crossed the trip_temp, we do not care. */
> -	if (tz->temperature < trip_temp)
> +	if (trip_temp <= 0 || tz->temperature < trip_temp)
>  		return;
>  
>  	trace_thermal_zone_trip(tz, trip, trip_type);




  parent reply	other threads:[~2014-11-20  2:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12 23:43 [PATCH] thermal: core: ignore invalid trip temperature Srinivas Pandruvada
2014-11-13  9:23 ` Lukasz Majewski
     [not found]   ` <1415892544.4581.17.camel@spandruv-hsb-test>
     [not found]     ` <20141114125054.64e93e5b@amdc2363>
2014-11-15 17:24       ` Srinivas Pandruvada
2014-11-20  2:25 ` Zhang Rui [this message]
2014-11-20 10:25   ` Lukasz Majewski
2014-11-20 17:13     ` Srinivas Pandruvada
2014-11-25  5:34     ` Zhang Rui

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=1416450331.5808.3.camel@rzhang1-toshiba \
    --to=rui.zhang@intel.com \
    --cc=edubezval@gmail.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox