diff --git a/arch/arm/src/common/up_lowputs.c b/arch/arm/src/common/up_lowputs.c index 890167e0ef..b3234637f5 100644 --- a/arch/arm/src/common/up_lowputs.c +++ b/arch/arm/src/common/up_lowputs.c @@ -67,7 +67,7 @@ void up_lowputs(const char *str) { - while(*str) + while (*str) { up_lowputc(*str++); } diff --git a/arch/arm/src/sama5/sam_nand.c b/arch/arm/src/sama5/sam_nand.c index 3f1a041ef9..9e4bf0e8b1 100644 --- a/arch/arm/src/sama5/sam_nand.c +++ b/arch/arm/src/sama5/sam_nand.c @@ -1738,7 +1738,7 @@ static int nand_read_pmecc(struct sam_nandcs_s *priv, off_t block, /* Wait until the kernel of the PMECC is not busy */ - while((nand_getreg(SAM_HSMC_PMECCSR) & HSMC_PMECCSR_BUSY) != 0); + while ((nand_getreg(SAM_HSMC_PMECCSR) & HSMC_PMECCSR_BUSY) != 0); return OK; } #endif diff --git a/arch/arm/src/stm32/stm32_flash.c b/arch/arm/src/stm32/stm32_flash.c index 20b0cfe103..f725fb7f7d 100644 --- a/arch/arm/src/stm32/stm32_flash.c +++ b/arch/arm/src/stm32/stm32_flash.c @@ -148,7 +148,7 @@ int up_progmem_erasepage(uint16_t page) putreg32(page * STM32_FLASH_PAGESIZE, STM32_FLASH_AR); modifyreg32(STM32_FLASH_CR, 0, FLASH_CR_STRT); - while(getreg32(STM32_FLASH_SR) & FLASH_SR_BSY) up_waste(); + while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY) up_waste(); modifyreg32(STM32_FLASH_CR, FLASH_CR_PER, 0); @@ -232,7 +232,7 @@ int up_progmem_write(uint32_t addr, const void *buf, size_t count) putreg16(*hword, addr); - while(getreg32(STM32_FLASH_SR) & FLASH_SR_BSY) up_waste(); + while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY) up_waste(); /* Verify */ diff --git a/arch/arm/src/stm32/stm32_pwr.c b/arch/arm/src/stm32/stm32_pwr.c index 1c95135410..21a3975992 100644 --- a/arch/arm/src/stm32/stm32_pwr.c +++ b/arch/arm/src/stm32/stm32_pwr.c @@ -129,14 +129,14 @@ void stm32_pwr_setvos(uint16_t vos) * 4. Poll VOSF bit of in PWR_CSR register. Wait until it is reset to 0. */ - while((stm32_pwr_getreg(STM32_PWR_CSR_OFFSET) & PWR_CSR_VOSF) != 0); + while ((stm32_pwr_getreg(STM32_PWR_CSR_OFFSET) & PWR_CSR_VOSF) != 0); regval = stm32_pwr_getreg(STM32_PWR_CR_OFFSET); regval &= ~PWR_CR_VOS_MASK; regval |= (vos & PWR_CR_VOS_MASK); stm32_pwr_putreg(STM32_PWR_CR_OFFSET, regval); - while((stm32_pwr_getreg(STM32_PWR_CSR_OFFSET) & PWR_CSR_VOSF) != 0); + while ((stm32_pwr_getreg(STM32_PWR_CSR_OFFSET) & PWR_CSR_VOSF) != 0); } #endif diff --git a/arch/arm/src/stm32/stm32f10xxx_rcc.c b/arch/arm/src/stm32/stm32f10xxx_rcc.c index f887f89959..f46f0d104e 100644 --- a/arch/arm/src/stm32/stm32f10xxx_rcc.c +++ b/arch/arm/src/stm32/stm32f10xxx_rcc.c @@ -548,7 +548,7 @@ static void stm32_stdclockconfig(void) /* Wait for PLL2 ready */ - while((getreg32(STM32_RCC_CR) & RCC_CR_PLL2RDY) == 0); + while ((getreg32(STM32_RCC_CR) & RCC_CR_PLL2RDY) == 0); /* Setup PLL3 for MII/RMII clock on MCO */ diff --git a/arch/arm/src/stm32/stm32f30xxx_rcc.c b/arch/arm/src/stm32/stm32f30xxx_rcc.c index c18f1de3e3..1209013d8d 100644 --- a/arch/arm/src/stm32/stm32f30xxx_rcc.c +++ b/arch/arm/src/stm32/stm32f30xxx_rcc.c @@ -457,7 +457,7 @@ static void stm32_stdclockconfig(void) /* Wait for PLL2 ready */ - while((getreg32(STM32_RCC_CR) & RCC_CR_PLL2RDY) == 0); + while ((getreg32(STM32_RCC_CR) & RCC_CR_PLL2RDY) == 0); /* Setup PLL3 for MII/RMII clock on MCO */ diff --git a/arch/arm/src/stm32/stm32f40xxx_rcc.c b/arch/arm/src/stm32/stm32f40xxx_rcc.c index bba3c2142b..4c74fa912e 100644 --- a/arch/arm/src/stm32/stm32f40xxx_rcc.c +++ b/arch/arm/src/stm32/stm32f40xxx_rcc.c @@ -686,14 +686,14 @@ static void stm32_stdclockconfig(void) regval = getreg32(STM32_PWR_CR); regval |= PWR_CR_ODEN; putreg32(regval, STM32_PWR_CR); - while((getreg32(STM32_PWR_CSR) & PWR_CSR_ODRDY) == 0) + while ((getreg32(STM32_PWR_CSR) & PWR_CSR_ODRDY) == 0) { } regval = getreg32(STM32_PWR_CR); regval |= PWR_CR_ODSWEN; putreg32(regval, STM32_PWR_CR); - while((getreg32(STM32_PWR_CSR) & PWR_CSR_ODSWRDY) == 0) + while ((getreg32(STM32_PWR_CSR) & PWR_CSR_ODSWRDY) == 0) { } diff --git a/arch/arm/src/tiva/tiva_flash.c b/arch/arm/src/tiva/tiva_flash.c index 154617fd6a..fe463222cf 100644 --- a/arch/arm/src/tiva/tiva_flash.c +++ b/arch/arm/src/tiva/tiva_flash.c @@ -217,7 +217,7 @@ static ssize_t tiva_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t n /* wait until write has finished */ - while(getreg32(TIVA_FLASH_FMC) & FLASH_FMC_WRITE); + while (getreg32(TIVA_FLASH_FMC) & FLASH_FMC_WRITE); } return nblocks; diff --git a/arch/avr/src/common/up_lowputs.c b/arch/avr/src/common/up_lowputs.c index 5e57ac7262..de4b4ff169 100644 --- a/arch/avr/src/common/up_lowputs.c +++ b/arch/avr/src/common/up_lowputs.c @@ -67,7 +67,7 @@ void up_lowputs(const char *str) { - while(*str) + while (*str) { up_lowputc(*str++); } diff --git a/arch/avr/src/common/up_puts.c b/arch/avr/src/common/up_puts.c index c7cde66a26..e9b4171b98 100644 --- a/arch/avr/src/common/up_puts.c +++ b/arch/avr/src/common/up_puts.c @@ -68,7 +68,7 @@ void up_puts(const char *str) { - while(*str) + while (*str) { up_putc(*str++); } diff --git a/arch/hc/src/common/up_puts.c b/arch/hc/src/common/up_puts.c index 68ad386708..5c888ef16f 100644 --- a/arch/hc/src/common/up_puts.c +++ b/arch/hc/src/common/up_puts.c @@ -69,7 +69,7 @@ void up_puts(const char *str) { - while(*str) + while (*str) { up_putc(*str++); } diff --git a/arch/mips/src/common/up_lowputs.c b/arch/mips/src/common/up_lowputs.c index 314e239b1d..396edeb1bd 100644 --- a/arch/mips/src/common/up_lowputs.c +++ b/arch/mips/src/common/up_lowputs.c @@ -67,7 +67,7 @@ void up_lowputs(const char *str) { - while(*str) + while (*str) { up_lowputc(*str++); } diff --git a/arch/mips/src/common/up_puts.c b/arch/mips/src/common/up_puts.c index 2394343f95..1b9f31f84e 100644 --- a/arch/mips/src/common/up_puts.c +++ b/arch/mips/src/common/up_puts.c @@ -68,7 +68,7 @@ void up_puts(const char *str) { - while(*str) + while (*str) { up_putc(*str++); } diff --git a/arch/mips/src/pic32mx/pic32mx-lowinit.c b/arch/mips/src/pic32mx/pic32mx-lowinit.c index d6bc6a8120..0eb34d0c9a 100644 --- a/arch/mips/src/pic32mx/pic32mx-lowinit.c +++ b/arch/mips/src/pic32mx/pic32mx-lowinit.c @@ -125,11 +125,12 @@ static inline void pic32mx_waitstates(void) residual = BOARD_CPU_CLOCK; nwaits = 0; - while(residual > MAX_FLASH_HZ) + while (residual > MAX_FLASH_HZ) { nwaits++; residual -= MAX_FLASH_HZ; } + DEBUGASSERT(nwaits < 8); /* Set the FLASH wait states -- clearing all other bits! */ diff --git a/arch/rgmp/src/rgmp.c b/arch/rgmp/src/rgmp.c index db5dd955e8..e717821122 100644 --- a/arch/rgmp/src/rgmp.c +++ b/arch/rgmp/src/rgmp.c @@ -151,9 +151,10 @@ void rtos_stop_running(void) nuttx_arch_exit(); - while(1) { - arch_hlt(); - } + while (1) + { + arch_hlt(); + } } int rtos_vnet_init(struct rgmp_vnet *vnet) diff --git a/arch/sh/src/common/up_lowputs.c b/arch/sh/src/common/up_lowputs.c index 88cc240689..627b22e0c8 100644 --- a/arch/sh/src/common/up_lowputs.c +++ b/arch/sh/src/common/up_lowputs.c @@ -67,7 +67,7 @@ void up_lowputs(const char *str) { - while(*str) + while (*str) { up_lowputc(*str++); } diff --git a/arch/sh/src/common/up_puts.c b/arch/sh/src/common/up_puts.c index e17338039f..968e216d20 100644 --- a/arch/sh/src/common/up_puts.c +++ b/arch/sh/src/common/up_puts.c @@ -68,7 +68,7 @@ void up_puts(const char *str) { - while(*str) + while (*str) { up_putc(*str++); } diff --git a/arch/x86/src/common/up_lowputs.c b/arch/x86/src/common/up_lowputs.c index b6ea96cc2c..7a63135261 100644 --- a/arch/x86/src/common/up_lowputs.c +++ b/arch/x86/src/common/up_lowputs.c @@ -67,7 +67,7 @@ void up_lowputs(const char *str) { - while(*str) + while (*str) { up_lowputc(*str++); } diff --git a/arch/x86/src/common/up_puts.c b/arch/x86/src/common/up_puts.c index c4df9ad71a..047802b6ac 100644 --- a/arch/x86/src/common/up_puts.c +++ b/arch/x86/src/common/up_puts.c @@ -68,7 +68,7 @@ void up_puts(const char *str) { - while(*str) + while (*str) { up_putc(*str++); }