diff --git a/configs/lpc4330-xplorer/src/up_nsh.c b/configs/lpc4330-xplorer/src/up_nsh.c index 3a7fa83cd4e..df1f0ddf7fa 100644 --- a/configs/lpc4330-xplorer/src/up_nsh.c +++ b/configs/lpc4330-xplorer/src/up_nsh.c @@ -103,7 +103,7 @@ static int nsh_spifi_initialize(void) return ret; } #else - /* Initialize to provide NXFFS on the MTD interface */1G + /* Initialize to provide NXFFS on the MTD interface */ ret = nxffs_initialize(mtd); if (ret < 0) diff --git a/configs/mikroe-stm32f4/src/up_clockconfig.c b/configs/mikroe-stm32f4/src/up_clockconfig.c index 3c55bd9501a..8950147eefe 100644 --- a/configs/mikroe-stm32f4/src/up_clockconfig.c +++ b/configs/mikroe-stm32f4/src/up_clockconfig.c @@ -109,7 +109,7 @@ void stm32_board_clockconfig(void) regval |= STM32_RCC_CFGR_PPRE1; putreg32(regval, STM32_RCC_CFGR); - /* Set the PLL dividers and multiplers to configure the main PLL */ + /* Set the PLL dividers and multipliers to configure the main PLL */ regval = (STM32_PLLCFG_PLLM | STM32_PLLCFG_PLLN |STM32_PLLCFG_PLLP | RCC_PLLCFG_PLLSRC_HSI | STM32_PLLCFG_PLLQ); diff --git a/configs/mikroe-stm32f4/src/up_nsh.c b/configs/mikroe-stm32f4/src/up_nsh.c index b8be4a4a7c2..844389e93db 100644 --- a/configs/mikroe-stm32f4/src/up_nsh.c +++ b/configs/mikroe-stm32f4/src/up_nsh.c @@ -181,9 +181,6 @@ int nsh_archinitialize(void) { -#if defined(HAVE_USBHOST) || defined(HAVE_USBMONITOR) - int ret; -#endif #ifdef CONFIG_STM32_SPI3 FAR struct spi_dev_s *spi; FAR struct mtd_dev_s *mtd; diff --git a/configs/mx1ads/src/up_boot.c b/configs/mx1ads/src/up_boot.c index 67ac4ce1763..6d7576d0c41 100644 --- a/configs/mx1ads/src/up_boot.c +++ b/configs/mx1ads/src/up_boot.c @@ -81,7 +81,7 @@ void imx_boardinitialize(void) (IMX_CSCR_USBDIV << PLL_CSCR_USBDIV_SHIFT) | /* USB divider */ CSCR_SDCNT_4thEDGE | /* Shutdown on 4th edge */ (IMX_CSCR_BCLKDIV << PLL_CSCR_BCLKDIV_SHIFT) | /* Bclock divider */ - PLL_CSCR_SPEN | PLL_CSCR_MPEN); /* Enable MUC and System PLL */ + PLL_CSCR_SPEN | PLL_CSCR_MPEN); /* Enable MUC and System PLL */ putreg32(regval, IMX_PLL_CSCR); /* Use these new frequencies now */ diff --git a/configs/olimex-strp711/src/up_nsh.c b/configs/olimex-strp711/src/up_nsh.c index e1037231053..693a51d2a83 100644 --- a/configs/olimex-strp711/src/up_nsh.c +++ b/configs/olimex-strp711/src/up_nsh.c @@ -125,11 +125,10 @@ int nsh_archinitialize(void) { +#ifdef NSH_HAVEMMCSD FAR struct spi_dev_s *spi; int ret; -#ifdef NSH_HAVEMMCSD - /* Get the SPI port */ message("nsh_archinitialize: Initializing SPI port %d\n", diff --git a/configs/pic32mx7mmb/src/up_touchscreen.c b/configs/pic32mx7mmb/src/up_touchscreen.c index 7babc619471..2f1bce71393 100644 --- a/configs/pic32mx7mmb/src/up_touchscreen.c +++ b/configs/pic32mx7mmb/src/up_touchscreen.c @@ -1365,9 +1365,6 @@ int arch_tcinitialize(int minor) { FAR struct tc_dev_s *priv; char devname[DEV_NAMELEN]; -#ifdef CONFIG_TOUCHSCREEN_MULTIPLE - irqstate_t flags; -#endif int ret; ivdbg("minor: %d\n", minor); diff --git a/configs/px4fmu-v2_upstream/src/px4fmu2_init.c b/configs/px4fmu-v2_upstream/src/px4fmu2_init.c index 5b65375916d..4d13cda1019 100644 --- a/configs/px4fmu-v2_upstream/src/px4fmu2_init.c +++ b/configs/px4fmu-v2_upstream/src/px4fmu2_init.c @@ -195,7 +195,9 @@ void stm32_boardinitialize(void) int nsh_archinitialize(void) { +#ifdef CONFIG_MMCSD int ret; +#endif /* Configure ADC pins */ diff --git a/configs/sam4l-xplained/src/sam_buttons.c b/configs/sam4l-xplained/src/sam_buttons.c index e06f476fcc9..2d617565219 100644 --- a/configs/sam4l-xplained/src/sam_buttons.c +++ b/configs/sam4l-xplained/src/sam_buttons.c @@ -147,6 +147,7 @@ xcpt_t board_button_irq(int id, xcpt_t irqhandler) sam_gpioirq(IRQ_SW0); (void)irq_attach(IRQ_SW0, irqhandler); sam_gpioirqenable(IRQ_SW0); + irqrestore(flags); } /* Return the old button handler (so that it can be restored) */ diff --git a/configs/sam4s-xplained/src/sam_buttons.c b/configs/sam4s-xplained/src/sam_buttons.c index f072440fc2a..ce7e68e612f 100644 --- a/configs/sam4s-xplained/src/sam_buttons.c +++ b/configs/sam4s-xplained/src/sam_buttons.c @@ -145,6 +145,7 @@ xcpt_t board_button_irq(int id, xcpt_t irqhandler) sam_gpioirq(IRQ_BP2); (void)irq_attach(IRQ_BP2, irqhandler); sam_gpioirqenable(IRQ_BP2); + irqrestore(flags); } /* Return the old button handler (so that it can be restored) */ diff --git a/configs/skp16c26/src/up_lcd.c b/configs/skp16c26/src/up_lcd.c index a47f4af510c..75beec8c433 100644 --- a/configs/skp16c26/src/up_lcd.c +++ b/configs/skp16c26/src/up_lcd.c @@ -116,6 +116,7 @@ static inline void up_setrs(bool data) { regval &= ~(1 << 0); /* Low = control */ } + putreg8(regval, M16C_P6); } @@ -128,7 +129,7 @@ static inline void up_seten(void) /* Set bit 1 of port 6 */ register uint8_t regval = getreg8(M16C_P6); - regval = (1 << 1); + regval |= (1 << 1); putreg8(regval, M16C_P6); } diff --git a/configs/stm32ldiscovery/src/stm32_nsh.c b/configs/stm32ldiscovery/src/stm32_nsh.c index 63c29c5dc96..bd633b65935 100644 --- a/configs/stm32ldiscovery/src/stm32_nsh.c +++ b/configs/stm32ldiscovery/src/stm32_nsh.c @@ -82,13 +82,11 @@ int nsh_archinitialize(void) { - int ret = OK; - +#ifdef CONFIG_STM32_LCD /* Initialize the SLCD and register the SLCD device as /dev/slcd */ -#ifdef CONFIG_STM32_LCD - ret = stm32_slcd_initialize(); + return stm32_slcd_initialize(); +#else + return OK; #endif - - return ret; } diff --git a/configs/twr-k60n512/src/up_buttons.c b/configs/twr-k60n512/src/up_buttons.c index 4bd6b7adf6f..7e1459d8a0c 100644 --- a/configs/twr-k60n512/src/up_buttons.c +++ b/configs/twr-k60n512/src/up_buttons.c @@ -135,7 +135,7 @@ uint8_t board_buttons(void) #ifdef CONFIG_ARCH_IRQBUTTONS xcpt_t board_button_irq(int id, xcpt_t irqhandler) { - xcpt_t oldhandler = NULL; + xcpt_t oldhandler; uint32_t pinset; /* Map the button id to the GPIO bit set. */ diff --git a/configs/us7032evb1/shterm/shterm.c b/configs/us7032evb1/shterm/shterm.c index f9ff2994aaa..361f134ffb7 100644 --- a/configs/us7032evb1/shterm/shterm.c +++ b/configs/us7032evb1/shterm/shterm.c @@ -110,6 +110,7 @@ static void putconsole(char ch) { (void)putc(ch, g_logstream); } + (void)putchar(ch); } @@ -139,6 +140,7 @@ static void printconsole(const char *fmt, ...) { (void)vfprintf(g_logstream, fmt, ap); } + (void)vprintf(fmt, ap); va_end(ap); } @@ -435,7 +437,7 @@ static void close_tty(void) (void)close(g_fd); } - if (g_logstream >= 0) + if (g_logstream) { (void)fclose(g_logstream); } @@ -717,7 +719,7 @@ int main(int argc, char **argv, char **envp) { sendfile(g_fd, filename, 0); } - else if (ch1 == 'v' || ch1 == 'v') + else if (ch1 == 'v' || ch1 == 'V') { sendfile(g_fd, filename, 1); }