Message ID | 20150928091653.GA11367@mwanda (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
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) { > -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi, On Mon, Sep 28, 2015 at 12:16:53PM +0300, Dan Carpenter wrote: > We need flags to be signed for the error handling to work. > > Fixes: 74aab849f342 ('power: bq27xxx_battery: Cleanup health checking') > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Thanks, Andrzej Hajda was slightly fast than you, so I merged his patch instead. I merged some of your patch description into his patch, though. -- Sebastian
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) {
We need flags to be signed for the error handling to work. Fixes: 74aab849f342 ('power: bq27xxx_battery: Cleanup health checking') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html