All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg@redhat.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH 2/3] hwmon: Fix applesmc temperature
Date: Wed, 10 Aug 2011 17:17:53 +0000	[thread overview]
Message-ID: <20110810171753.GB7012@srcf.ucam.org> (raw)
In-Reply-To: <1312906483-3046-2-git-send-email-mjg@redhat.com>

On Wed, Aug 10, 2011 at 10:05:05AM -0700, Guenter Roeck wrote:
> >  	if (entry->len = 2) {
> > +		if (buffer[0] >= 0x80) {
> > +			/* The two byte format is signed - ignore negative */
> > +			return -EINVAL;
> > +		}
> 
> Kind of unusual. Do you have evidence that such an error is in fact
> seen ? If there is no such evidence, I'd rather keep the original code.
> We don't usually return errors for negative temperature readings just
> because we assume that the readings might be erroneous.

Yeah, my MBA returns these from TCZ3 and TH0F. Typical read value is 
0xf978. There may be some other underlying issue that's triggering this, 
but returning data that's known to be bogus seems unhelpful.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  parent reply	other threads:[~2011-08-10 17:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-09 16:14 [lm-sensors] [PATCH 2/3] hwmon: Fix applesmc temperature handling Matthew Garrett
2011-08-10 17:05 ` [lm-sensors] [PATCH 2/3] hwmon: Fix applesmc temperature Guenter Roeck
2011-08-10 17:17 ` Matthew Garrett [this message]
2011-08-10 17:41 ` Guenter Roeck
2011-08-10 17:57 ` Matthew Garrett
2011-08-11 19:36 ` Henrik Rydberg
2011-08-11 19:42 ` Matthew Garrett

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=20110810171753.GB7012@srcf.ucam.org \
    --to=mjg@redhat.com \
    --cc=lm-sensors@vger.kernel.org \
    /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.