Re: [PATCH 2/3] hwmon: Fix applesmc temperature handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx

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


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux