linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Andrew F. Davis" <afd@ti.com>
To: "Dan Carpenter" <dan.carpenter@oracle.com>,
	"Pali Rohár" <pali.rohar@gmail.com>
Cc: Sebastian Reichel <sre@kernel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-pm@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] power: bq27xxx_battery: signedness bug in bq27xxx_battery_read_health()
Date: Mon, 28 Sep 2015 10:08:37 -0500	[thread overview]
Message-ID: <560957F5.3090900@ti.com> (raw)
In-Reply-To: <20150928091653.GA11367@mwanda>

On 09/28/2015 04:16 AM, Dan Carpenter wrote:
> We need flags to be signed for the error handling to work.
>
> Fixes: 74aab849f342 ('power: bq27xxx_battery: Cleanup health checking')

This bug looks to have been added back in c91d36ea8116, either way the
fix itself is correct so,

> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>

Acked-by: Andrew F. Davis <afd@ti.com>

> diff --git a/drivers/power/bq27xxx_battery.c b/drivers/power/bq27xxx_battery.c
> index 473aa2f..994c78d 100644
> --- a/drivers/power/bq27xxx_battery.c
> +++ b/drivers/power/bq27xxx_battery.c
> @@ -691,7 +691,7 @@ static bool bq27xxx_battery_dead(struct bq27xxx_device_info *di, u16 flags)
>    */
>   static int bq27xxx_battery_read_health(struct bq27xxx_device_info *di)
>   {
> -	u16 flags;
> +	int flags;
>
>   	flags = bq27xxx_read(di, BQ27XXX_REG_FLAGS, false);
>   	if (flags < 0) {
>

  reply	other threads:[~2015-09-28 15:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-28  9:16 [patch] power: bq27xxx_battery: signedness bug in bq27xxx_battery_read_health() Dan Carpenter
2015-09-28 15:08 ` Andrew F. Davis [this message]
2015-09-28 16:33 ` 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=560957F5.3090900@ti.com \
    --to=afd@ti.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pali.rohar@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 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).