From c44cfbf87e7a07c543b5ebef5a8228b5c335c7b4 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Wed, 13 Sep 2017 11:05:09 -1000 Subject: [PATCH] nxphlite-v3 spi:fix sign-compare --- src/drivers/boards/nxphlite-v3/nxphlite_spi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/drivers/boards/nxphlite-v3/nxphlite_spi.c b/src/drivers/boards/nxphlite-v3/nxphlite_spi.c index 79fa9ab0c5..a5ed1c6ec8 100644 --- a/src/drivers/boards/nxphlite-v3/nxphlite_spi.c +++ b/src/drivers/boards/nxphlite-v3/nxphlite_spi.c @@ -119,19 +119,19 @@ void nxphlite_spidev_initialize(void) kinetis_pinconfig(GPIO_EXTI_BARO_INT1); kinetis_pinconfig(GPIO_P_INT); - for (int cs = 0; cs < arraySize(spi0selects_gpio); cs++) { + for (unsigned int cs = 0; cs < arraySize(spi0selects_gpio); cs++) { if (spi0selects_gpio[cs] != 0) { kinetis_pinconfig(spi0selects_gpio[cs]); } } - for (int cs = 0; cs < arraySize(spi1selects_gpio); cs++) { + for (unsigned int cs = 0; cs < arraySize(spi1selects_gpio); cs++) { if (spi1selects_gpio[cs] != 0) { kinetis_pinconfig(spi1selects_gpio[cs]); } } - for (int cs = 0; cs < arraySize(spi2selects_gpio); cs++) { + for (unsigned int cs = 0; cs < arraySize(spi2selects_gpio); cs++) { if (spi2selects_gpio[cs] != 0) { kinetis_pinconfig(spi2selects_gpio[cs]); } @@ -260,7 +260,7 @@ void kinetis_spi0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected /* Making sure the other peripherals are not selected */ - for (int cs = 0; arraySize(spi0selects_gpio) > 1 && cs < arraySize(spi0selects_gpio); cs++) { + for (unsigned int cs = 0; arraySize(spi0selects_gpio) > 1 && cs < arraySize(spi0selects_gpio); cs++) { if (spi0selects_gpio[cs] != 0) { kinetis_gpiowrite(spi0selects_gpio[cs], 1); } @@ -289,7 +289,7 @@ void kinetis_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected /* Making sure the other peripherals are not selected */ - for (int cs = 0; arraySize(spi1selects_gpio) > 1 && cs < arraySize(spi1selects_gpio); cs++) { + for (unsigned int cs = 0; arraySize(spi1selects_gpio) > 1 && cs < arraySize(spi1selects_gpio); cs++) { if (spi1selects_gpio[cs] != 0) { kinetis_gpiowrite(spi1selects_gpio[cs], 1); } @@ -318,7 +318,7 @@ void kinetis_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected /* Making sure the other peripherals are not selected */ - for (int cs = 0; arraySize(spi2selects_gpio) > 1 && cs < arraySize(spi2selects_gpio); cs++) { + for (unsigned int cs = 0; arraySize(spi2selects_gpio) > 1 && cs < arraySize(spi2selects_gpio); cs++) { if (spi2selects_gpio[cs] != 0) { kinetis_gpiowrite(spi2selects_gpio[cs], 1); }