From e187dbd66358c30b8ead34371b76ac4d2975e9e5 Mon Sep 17 00:00:00 2001 From: hujun5 Date: Tue, 7 May 2024 12:06:59 +0800 Subject: [PATCH] chip/s698pm_cpustart.c: Fix compile error chip/s698pm_cpustart.c: In function 's698pm_cpu_boot': Error: chip/s698pm_cpustart.c:74:17: error: unused variable 'tcb' [-Werror=unused-variable] struct tcb_s *tcb = this_task(); ^~~ cc1: all warnings being treated as errors make[1]: *** [Makefile:99: s698pm_cpustart.o] Error 1 make[1]: Target 'libarch.a' not remade because of errors. make: *** [tools/LibTargets.mk:164: arch/sparc/src/libarch.a] Error 2 make: Target 'all' not remade because of errors. /github/workspace/sources/nuttx/tools/testbuild.sh: line 370: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory Normalize s698pm-dkit/smp Signed-off-by: hujun5 --- arch/sparc/src/s698pm/s698pm_cpustart.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/sparc/src/s698pm/s698pm_cpustart.c b/arch/sparc/src/s698pm/s698pm_cpustart.c index df58abff83..24ce75feeb 100644 --- a/arch/sparc/src/s698pm/s698pm_cpustart.c +++ b/arch/sparc/src/s698pm/s698pm_cpustart.c @@ -71,8 +71,6 @@ volatile static spinlock_t g_cpu_boot; void s698pm_cpu_boot(void) { - struct tcb_s *tcb = this_task(); - _info("CPU%d Started\n", this_cpu()); /* Initialize CPU interrupts */ @@ -84,12 +82,12 @@ void s698pm_cpu_boot(void) #ifdef CONFIG_SCHED_INSTRUMENTATION /* Notify that this CPU has started */ - sched_note_cpu_started(tcb); + sched_note_cpu_started(this_task()); #endif /* Reset scheduler parameters */ - nxsched_resume_scheduler(tcb); + nxsched_resume_scheduler(this_task()); /* And finally, enable cpu interrupts */