xtensa/esp32: Change "cpu <= CONFIG_SMP_NCPUS" to "cpu < CONFIG_SMP_NCPUS"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-01-19 02:31:55 +08:00 committed by Xiang Xiao
parent 77792a1598
commit aa2cdcd848
2 changed files with 3 additions and 3 deletions

View File

@ -412,7 +412,7 @@ bool esp32_gpioread(int pin)
void esp32_gpioirqinitialize(int cpu)
{
#ifdef CONFIG_SMP
DEBUGASSERT(cpu >= 0 && cpu <= CONFIG_SMP_NCPUS);
DEBUGASSERT(cpu >= 0 && cpu < CONFIG_SMP_NCPUS);
#else
DEBUGASSERT(cpu == 0);
#endif

View File

@ -519,7 +519,7 @@ void up_disable_irq(int irq)
}
DEBUGASSERT(cpuint >= 0 && cpuint <= ESP32_CPUINT_MAX);
DEBUGASSERT(cpu >= 0 && cpu <= CONFIG_SMP_NCPUS);
DEBUGASSERT(cpu >= 0 && cpu < CONFIG_SMP_NCPUS);
if (irq < XTENSA_NIRQ_INTERNAL)
{
@ -580,7 +580,7 @@ void up_enable_irq(int irq)
int cpuint = IRQ_GETCPUINT(g_irqmap[irq]);
DEBUGASSERT(cpuint >= 0 && cpuint <= ESP32_CPUINT_MAX);
DEBUGASSERT(cpu >= 0 && cpu <= CONFIG_SMP_NCPUS);
DEBUGASSERT(cpu >= 0 && cpu < CONFIG_SMP_NCPUS);
if (irq < XTENSA_NIRQ_INTERNAL)
{