Re: [PATCH v2] hwmon: (smsc47m192) Fix temperature limit and vrm write operations

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

 



On Sat, Jul 19, 2014 at 12:00:34AM +0200, Jean Delvare wrote:
> On Fri, 18 Jul 2014 12:11:54 -0700, Guenter Roeck wrote:
> > Temperature limit clamps are applied after converting the temperature
> > from milli-degrees C to degrees C, so either the clamp limit needs
> > to be specified in degrees C, not milli-degrees C, or clamping must
> > happen before converting to degrees C. Use the latter method to avoid
> > overflows.
> > 
> > vrm is an u8, so the written value needs to be limited to [0, 255].
> > 
> > Cc: Axel Lin <axel.lin@xxxxxxxxxx>
> > Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> > ---
> > v2: Clamp temperature limit first, then scale, to avoid overflows
> >     Don't clamp vrm but return an error if it is out of range.
> >     Fix typo in description
> > 
> >  drivers/hwmon/smsc47m192.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
[ ... ]
> 
> Looks good.
> 
> Reviewed-by: Jean Delvare <jdelvare@xxxxxxx>
> 
Thanks!

Guenter

_______________________________________________
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