From 0274821bb74344e851ca3e2a4d4b4450223598de Mon Sep 17 00:00:00 2001 From: Yong Cong Sin Date: Mon, 20 Nov 2023 16:44:53 +0800 Subject: [PATCH] arch: common: multilevel irq: move CAT_3RD_LVL_LIST into 3rd level guard The `CAT_3RD_LVL_LIST` macro is only used when `CONFIG_3RD_LEVEL_INTERRUPTS` is enabled, so move it into the compiler guard. Signed-off-by: Yong Cong Sin --- arch/common/multilevel_irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/common/multilevel_irq.c b/arch/common/multilevel_irq.c index 790089a19c..2c604abda1 100644 --- a/arch/common/multilevel_irq.c +++ b/arch/common/multilevel_irq.c @@ -54,12 +54,12 @@ const struct _irq_parent_entry _lvl2_irq_list[CONFIG_NUM_2ND_LEVEL_AGGREGATORS] = { LISTIFY(CONFIG_NUM_2ND_LEVEL_AGGREGATORS, CAT_2ND_LVL_LIST, (,), CONFIG_2ND_LVL_ISR_TBL_OFFSET) }; +#ifdef CONFIG_3RD_LEVEL_INTERRUPTS + #define CAT_3RD_LVL_LIST(i, base) \ INIT_IRQ_PARENT_OFFSET(INTC_DT_IRQN_GET(CONFIG_3RD_LVL_INTR_0##i##_OFFSET), \ CONFIG_3RD_LVL_INTR_0##i##_OFFSET, IRQ_INDEX_TO_OFFSET(i, base)) -#ifdef CONFIG_3RD_LEVEL_INTERRUPTS - const struct _irq_parent_entry _lvl3_irq_list[CONFIG_NUM_3RD_LEVEL_AGGREGATORS] = { LISTIFY(CONFIG_NUM_3RD_LEVEL_AGGREGATORS, CAT_3RD_LVL_LIST, (,), CONFIG_3RD_LVL_ISR_TBL_OFFSET) };