All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Laurentiu Palcu <lpalcu@gmail.com>
Cc: sre@kernel.org, laurentiu.palcu@intel.com, linux-pm@vger.kernel.org
Subject: Re: power_supply: Add support for TI BQ25890 charger chip
Date: Wed, 27 May 2015 12:27:01 +0300	[thread overview]
Message-ID: <20150527092701.GF11734@mwanda> (raw)
In-Reply-To: <CAD03FC+H0JQUR32eGLrVWe_OaiiMTxUmCxdBwuWnPwMRz8XSOQ@mail.gmail.com>

On Tue, May 26, 2015 at 09:08:46PM +0300, Laurentiu Palcu wrote:
> Hi Dan,
> 
> On 26 May 2015 17:45, "Dan Carpenter" <dan.carpenter@oracle.com> wrote:
> >
> > Hello Laurentiu Palcu,
> >
> > The patch 4aeae9cb0dad: "power_supply: Add support for TI BQ25890
> > charger chip" from May 19, 2015, leads to the following static
> > checker warning:
> >
> >         drivers/power/bq25890_charger.c:843 bq25890_probe()
> >         warn: impossible condition '(bq->chip_id < 0) => (0-255 < 0)'
> >
> > drivers/power/bq25890_charger.c
> >    841
> >    842          bq->chip_id = bq25890_field_read(bq, F_PN);
> >    843          if (bq->chip_id < 0) {
> >                     ^^^^^^^^^^^^^^^
> > Never true.
> Damn it... :/ I totally missed this. Thanks for catching it. chip_id should
> be int... Out of curiosity, what static checker did you use?

This was a Smatch warning.

regards,
dan carpenter


      parent reply	other threads:[~2015-05-27  9:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26  9:04 power_supply: Add support for TI BQ25890 charger chip Dan Carpenter
     [not found] ` <CAD03FC+H0JQUR32eGLrVWe_OaiiMTxUmCxdBwuWnPwMRz8XSOQ@mail.gmail.com>
2015-05-26 20:32   ` Sebastian Reichel
2015-05-27  9:27   ` Dan Carpenter [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=20150527092701.GF11734@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=laurentiu.palcu@intel.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=lpalcu@gmail.com \
    --cc=sre@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.