linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Laurentiu Palcu <laurentiu.palcu@intel.com>,
	Sebastian Reichel <sre@kernel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] power_supply: bq25890: make chip_id int
Date: Tue, 02 Jun 2015 22:12:44 +0900	[thread overview]
Message-ID: <556DABCC.2080302@samsung.com> (raw)
In-Reply-To: <1433241411-27423-1-git-send-email-laurentiu.palcu@intel.com>

W dniu 02.06.2015 o 19:36, Laurentiu Palcu pisze:
> Smatch static checker correctly detected an impossible condition because
> chip_id was declared as u8, instead of int:
> 
> drivers/power/bq25890_charger.c:843 bq25890_probe()
> warn: impossible condition '(bq->chip_id < 0) => (0-255 < 0)'
> 
> Also, while at it, fix the return value too.

I wondered whether this should be split into two commits... but actually
returning uninitialized value is not possible now because of the cast, so:

Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Best regards,
Krzysztof


  reply	other threads:[~2015-06-02 13:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02 10:36 [PATCH] power_supply: bq25890: make chip_id int Laurentiu Palcu
2015-06-02 13:12 ` Krzysztof Kozlowski [this message]
2015-06-02 19:28 ` Sebastian Reichel

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=556DABCC.2080302@samsung.com \
    --to=k.kozlowski@samsung.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=laurentiu.palcu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).