You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/11/10 01:11:48 UTC

(nuttx) 06/07: esp32s3/spiflash: Fix comment and remove unused variable

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/nuttx.git

commit f94daf09b2cb505b2e0f62e3bf3027f207b7bf55
Author: Tiago Medicci Serrano <ti...@espressif.com>
AuthorDate: Tue Oct 10 11:30:51 2023 -0300

    esp32s3/spiflash: Fix comment and remove unused variable
---
 arch/xtensa/src/esp32s3/esp32s3_spiflash.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/xtensa/src/esp32s3/esp32s3_spiflash.c b/arch/xtensa/src/esp32s3/esp32s3_spiflash.c
index 624677a54b..79d0fb2390 100644
--- a/arch/xtensa/src/esp32s3/esp32s3_spiflash.c
+++ b/arch/xtensa/src/esp32s3/esp32s3_spiflash.c
@@ -237,7 +237,6 @@ static struct spiflash_guard_funcs g_spi_flash_guard_funcs =
 
 static uint32_t s_flash_op_cache_state[CONFIG_SMP_NCPUS];
 
-static spinlock_t g_flash_op_lock;
 static rmutex_t g_flash_op_mutex;
 static volatile bool g_flash_op_can_start = false;
 static volatile bool g_flash_op_complete = false;
@@ -313,12 +312,12 @@ static void spiflash_start(void)
 
   DEBUGASSERT(cpu == 0 || cpu == 1);
 
+  /* Temporary raise schedule priority */
+
   nxsched_set_priority(tcb, SCHED_PRIORITY_MAX);
 
 #ifdef CONFIG_SMP
 
-  /* Temporary raise schedule priority */
-
   DEBUGASSERT(other_cpu == 0 || other_cpu == 1);
   DEBUGASSERT(other_cpu != cpu);
   if (OSINIT_OS_READY())
@@ -360,7 +359,6 @@ static void spiflash_start(void)
 
 static void spiflash_end(void)
 {
-  struct tcb_s *tcb = this_task();
   const int cpu = up_cpu_index();
 #ifdef CONFIG_SMP
   const int other_cpu = cpu ? 0 : 1;