This is an automated email from the ASF dual-hosted git repository. linguini pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push: new 627729635bf arch/tricore: remove redundant and misleading pointer usage in tricore_doirq() 627729635bf is described below commit 627729635bf87c5203de646d40c289a2b6abd829 Author: wangchengdong <wangchengd...@lixiang.com> AuthorDate: Sun Sep 7 17:34:04 2025 +0800 arch/tricore: remove redundant and misleading pointer usage in tricore_doirq() 'struct tcb_s **running_task = &g_running_tasks[this_cpu()];' was updated to 'struct tcb_s *running_task = g_running_tasks[this_cpu()];' 'if (*running_task != NULL) { ( *running_task)->xcp.regs = regs; }' was updated to 'if (running_task != NULL) { running_task->xcp.regs = regs; }' Signed-off-by: Chengdong Wang <wangchengd...@lixiang.com> --- arch/tricore/src/common/tricore_doirq.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/tricore/src/common/tricore_doirq.c b/arch/tricore/src/common/tricore_doirq.c index 1b43cc1f3f4..ab3ad511b2a 100644 --- a/arch/tricore/src/common/tricore_doirq.c +++ b/arch/tricore/src/common/tricore_doirq.c @@ -46,7 +46,7 @@ IFX_INTERRUPT_INTERNAL(tricore_doirq, 0, 255) { - struct tcb_s **running_task = &g_running_tasks[this_cpu()]; + struct tcb_s *running_task = g_running_tasks[this_cpu()]; struct tcb_s *tcb; #ifdef CONFIG_SUPPRESS_INTERRUPTS @@ -58,9 +58,9 @@ IFX_INTERRUPT_INTERNAL(tricore_doirq, 0, 255) icr.U = __mfcr(CPU_ICR); regs = (uintptr_t *)__mfcr(CPU_PCXI); - if (*running_task != NULL) + if (running_task != NULL) { - (*running_task)->xcp.regs = regs; + running_task->xcp.regs = regs; } board_autoled_on(LED_INIRQ); @@ -117,11 +117,11 @@ IFX_INTERRUPT_INTERNAL(tricore_doirq, 0, 255) up_set_current_regs(NULL); - /* (*running_task)->xcp.regs is about to become invalid + /* running_task->xcp.regs is about to become invalid * and will be marked as NULL to avoid misusage. */ - (*running_task)->xcp.regs = NULL; + running_task->xcp.regs = NULL; board_autoled_off(LED_INIRQ); #endif }