[PATCH 1/1] i2c: observe scl_count in i2c_deblock_gpio_loop()

Heiko Schocher hs at denx.de
Sat May 30 05:50:34 CEST 2020


Hello Heinrich,

Am 09.05.2020 um 18:20 schrieb Heinrich Schuchardt:
> When compiling with -Wtype-limits we see this error:
> 
> drivers/i2c/i2c-uclass.c: In function ‘i2c_deblock_gpio_loop’:
> drivers/i2c/i2c-uclass.c:517:21: error: comparison of
> unsigned expression >= 0 is always true [-Werror=type-limits]
>    517 |  while (scl_count-- >= 0) {
>        |
> 
> Don't loop forever.
> 
> Fixes: 1f746a2c82b1 ("i2c: Make deblock delay and SCL clock configurable")
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
>   drivers/i2c/i2c-uclass.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot-i2c master

Thanks!

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de


More information about the U-Boot mailing list