From: Patrick Delaunay Date: Fri, 21 Jun 2019 13:26:46 +0000 (+0200) Subject: gpio: stm32_gpio: Fix warnings when compiling with W=1 X-Git-Tag: v2019.10-rc1~30^2~16 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=99e14b2793015bf6323138b6058861bda086259f;p=oweals%2Fu-boot.git gpio: stm32_gpio: Fix warnings when compiling with W=1 This patch solves the following warnings: drivers/gpio/stm32_gpio.c: In function 'stm32_offset_to_index': : comparison between signed and unsigned integer expressions [-Wsign-compare] if (idx == offset) ^~ Signed-off-by: Patrice Chotard Signed-off-by: Patrick Delaunay --- diff --git a/drivers/gpio/stm32f7_gpio.c b/drivers/gpio/stm32f7_gpio.c index 5c9f2fe64d..e89707c01a 100644 --- a/drivers/gpio/stm32f7_gpio.c +++ b/drivers/gpio/stm32f7_gpio.c @@ -27,7 +27,7 @@ int stm32_offset_to_index(struct udevice *dev, unsigned int offset) { struct stm32_gpio_priv *priv = dev_get_priv(dev); - int idx = 0; + unsigned int idx = 0; int i; for (i = 0; i < STM32_GPIOS_PER_BANK; i++) {