This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 0ca5fb4edcf88718aa87ccd1e956f3ac80d48c97 Author: Abdelatif Guettouche <[email protected]> AuthorDate: Mon Aug 2 10:57:37 2021 +0200 arch/xtensa/esp32: When calling up_cpu_index no need to check if in SMP mode. up_cpu_index already does that. Signed-off-by: Abdelatif Guettouche <[email protected]> --- arch/xtensa/src/esp32/esp32_gpio.c | 4 ---- arch/xtensa/src/esp32/esp32_serial.c | 13 ------------- 2 files changed, 17 deletions(-) diff --git a/arch/xtensa/src/esp32/esp32_gpio.c b/arch/xtensa/src/esp32/esp32_gpio.c index a429b23..8f89c96 100644 --- a/arch/xtensa/src/esp32/esp32_gpio.c +++ b/arch/xtensa/src/esp32/esp32_gpio.c @@ -417,11 +417,7 @@ void esp32_gpioirqinitialize(void) /* Set up to receive peripheral interrupts on the current CPU */ -#ifdef CONFIG_SMP cpu = up_cpu_index(); -#else - cpu = 0; -#endif /* Attach the GPIO peripheral to the allocated CPU interrupt */ diff --git a/arch/xtensa/src/esp32/esp32_serial.c b/arch/xtensa/src/esp32/esp32_serial.c index 88a3470..6944627 100644 --- a/arch/xtensa/src/esp32/esp32_serial.c +++ b/arch/xtensa/src/esp32/esp32_serial.c @@ -1025,11 +1025,7 @@ static int esp32_attach(struct uart_dev_s *dev) /* Set up to receive peripheral interrupts on the current CPU */ -#ifdef CONFIG_SMP cpu = up_cpu_index(); -#else - cpu = 0; -#endif /* Attach the GPIO peripheral to the allocated CPU interrupt */ @@ -1073,12 +1069,7 @@ static void esp32_detach(struct uart_dev_s *dev) /* Disassociate the peripheral interrupt from the CPU interrupt */ -#ifdef CONFIG_SMP cpu = up_cpu_index(); -#else - cpu = 0; -#endif - esp32_detach_peripheral(cpu, priv->config->periph, priv->cpuint); /* And release the CPU interrupt */ @@ -1161,11 +1152,7 @@ static void dma_attach(uint8_t dma_chan) /* Set up to receive peripheral interrupts on the current CPU */ -#ifdef CONFIG_SMP cpu = up_cpu_index(); -#else - cpu = 0; -#endif /* Attach the UHCI interrupt to the allocated CPU interrupt * and attach and enable the IRQ.
