All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] hwmon: (max16065) Fix current calculation
Date: Mon, 29 Aug 2011 15:06:54 +0000	[thread overview]
Message-ID: <1314630414.2796.146.camel@groeck-laptop> (raw)
In-Reply-To: <1314563645-12021-1-git-send-email-guenter.roeck@ericsson.com>

On Mon, 2011-08-29 at 05:08 -0400, Jean Delvare wrote:
> On Sun, 28 Aug 2011 13:34:05 -0700, Guenter Roeck wrote:
> > Current calculation is completely wrong. Add missing brackets to fix it.
> > 
> > Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
> > ---
> > Candidate for stable (2.6.39+).
> > 
> >  drivers/hwmon/max16065.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/hwmon/max16065.c b/drivers/hwmon/max16065.c
> > index d94a24f..dd2d7b9 100644
> > --- a/drivers/hwmon/max16065.c
> > +++ b/drivers/hwmon/max16065.c
> > @@ -124,7 +124,7 @@ static inline int MV_TO_LIMIT(int mv, int range)
> >  
> >  static inline int ADC_TO_CURR(int adc, int gain)
> >  {
> > -	return adc * 1400000 / gain * 255;
> > +	return adc * 1400000 / (gain * 255);
> >  }
> >  
> >  /*
> 
> Good catch.
> 
> Acked-by: Jean Delvare <khali@linux-fr.org>
> 
I'd call it embarrassing not to have caught it earlier ... 

Thanks a lot for the review!

Guenter



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

      parent reply	other threads:[~2011-08-29 15:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-28 20:34 [lm-sensors] [PATCH] hwmon: (max16065) Fix current calculation Guenter Roeck
2011-08-29  9:08 ` Jean Delvare
2011-08-29 15:06 ` Guenter Roeck [this message]

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=1314630414.2796.146.camel@groeck-laptop \
    --to=guenter.roeck@ericsson.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.