io_storage: use unsigned int for index
authorEtienne Carriere <etienne.carriere@st.com>
Wed, 7 Jun 2017 14:43:19 +0000 (16:43 +0200)
committerEtienne Carriere <etienne.carriere@st.com>
Fri, 23 Jun 2017 07:38:13 +0000 (09:38 +0200)
This change avoids warning about type conversion.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
drivers/io/io_storage.c

index fe6542368e4fa6799d898e6a5e07f4343315026a..0918de0a23daefb7ddb14c902e84818d266b1dc4 100644 (file)
@@ -94,7 +94,7 @@ static void set_handle(uintptr_t *handle, io_entity_t *entity)
 static int find_first_entity(const io_entity_t *entity, unsigned int *index_out)
 {
        int result = -ENOENT;
-       for (int index = 0; index < MAX_IO_HANDLES; ++index) {
+       for (unsigned int index = 0; index < MAX_IO_HANDLES; ++index) {
                if (entity_map[index] == entity) {
                        result = 0;
                        *index_out = index;