All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Steven Honeyman <stevenhoneyman@gmail.com>,
	linux-kernel@vger.kernel.org,
	Gabriele Mazzotta <gabriele.mzt@gmail.com>
Subject: Re: [PATCH] i8k: Add support for temperature sensor labels
Date: Sat, 29 Nov 2014 10:15:52 -0800	[thread overview]
Message-ID: <547A0D58.5020806@roeck-us.net> (raw)
In-Reply-To: <201411291730.28743@pali>

On 11/29/2014 08:30 AM, Pali Rohár wrote:
> On Saturday 29 November 2014 17:24:08 Guenter Roeck wrote:
>> On 11/29/2014 08:04 AM, Pali Rohár wrote:
>>> +static bool __init i8k_check_temp(int sensor)
>>> +{
>>> +	int err;
>>> +
>>> +	/*
>>> +	 * Check if temperature sensor type is valid.
>>> +	 *
>>> +	 * If it is valid then sensor should work. But some
>>> sensors are not +	 * available at any time. E.g GPU sensor
>>> on Optimus/PowerExpress/Enduro +	 * card does not work (or
>>> return bogus value) when card is turned off. +	 * So this
>>> function should not fail in this case. +	 */
>>> +	err = i8k_get_temp_type(sensor);
>>> +	if (err >= 0)
>>> +		return true;
>>> +
>>
>> Are you sure this function is provided for all systems ?
>> I am a bit concerned that we may wrongly disable sensors this
>> way, especially on older systems.
>>
>
> I do not know if that function is provided on all systems. But
> this code does not disable sensors. If function fail, then we
> fallback to temperature read down. Return true means that we
> enable sensor.
>

You are right. Guess I didn't have enough coffee this morning.

Thanks,
Guenter


  reply	other threads:[~2014-11-29 18:15 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-29 16:04 [PATCH] i8k: Add support for temperature sensor labels Pali Rohár
2014-11-29 16:09 ` Pali Rohár
2014-11-29 16:24   ` Guenter Roeck
2014-11-29 16:32     ` Pali Rohár
2014-11-29 16:37   ` Steven Honeyman
2014-11-29 17:07   ` Gabriele Mazzotta
2014-11-29 17:18     ` Pali Rohár
2014-11-29 18:27       ` Gabriele Mazzotta
2014-11-29 18:58         ` Guenter Roeck
2014-11-29 19:07           ` Pali Rohár
2014-11-29 21:34             ` Guenter Roeck
2014-11-30  0:07             ` Guenter Roeck
2014-11-30  9:53               ` Pali Rohár
2014-11-30 16:00                 ` Guenter Roeck
2014-11-30 17:44                   ` Pali Rohár
2014-11-30 17:54                     ` Guenter Roeck
2014-11-30 18:00                       ` Pali Rohár
2014-11-30 18:22                         ` Guenter Roeck
2014-11-30  1:25             ` Guenter Roeck
2014-11-30 10:11               ` Pali Rohár
2014-11-30 16:04                 ` Guenter Roeck
2014-11-29 16:24 ` Guenter Roeck
2014-11-29 16:30   ` Pali Rohár
2014-11-29 18:15     ` Guenter Roeck [this message]
2014-11-29 17:43 ` Greg Kroah-Hartman
2014-11-29 17:49   ` Pali Rohár
2014-11-29 17:51     ` Greg Kroah-Hartman
2014-11-29 18:04       ` Pali Rohár
2014-12-02 13:23         ` Jean Delvare
2014-12-02 14:26           ` Guenter Roeck
2014-12-03  9:09             ` Jean Delvare
2014-12-03  9:25               ` Pali Rohár
2014-12-03 10:11                 ` Jean Delvare
2014-12-03 19:14               ` Guenter Roeck
2014-12-04 10:16                 ` Jean Delvare
2014-11-29 18:05       ` Guenter Roeck
2014-11-29 18:00   ` [lm-sensors] " Guenter Roeck
2014-11-29 18:00     ` Guenter Roeck

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=547A0D58.5020806@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=arnd@arndb.de \
    --cc=gabriele.mzt@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=stevenhoneyman@gmail.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 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.