gpio: stm32_gpio: Fix warnings when compiling with W=1
authorPatrick Delaunay <patrick.delaunay@st.com>
Fri, 21 Jun 2019 13:26:46 +0000 (15:26 +0200)
committerPatrick Delaunay <patrick.delaunay@st.com>
Fri, 12 Jul 2019 09:50:55 +0000 (11:50 +0200)
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 <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
drivers/gpio/stm32f7_gpio.c

index 5c9f2fe64d47c71b958d96326004f847ae1a41f7..e89707c01afa86b6d7095cd4360ca4e7b2503cd1 100644 (file)
@@ -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++) {