lkml.org 
[lkml]   [2015]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] power_supply: bq25890: make chip_id int
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



\
 
 \ /
  Last update: 2015-06-02 15:41    [W:0.250 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site