From 7d3fa1c2c8f74ecbcc30e8f09d6dfe67c8680cc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B8e?= Date: Wed, 29 Jan 2020 10:41:47 +0100 Subject: [PATCH] gen_isr_tables: Improve error message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Users are reportedly not able to understand how to debug the following error message from gen_isr_tables: gen_isr_tables.py: multiple registrations at table_index 8 for irq 8 Debugging issues these kinds of issues is difficult so we need to give users as much information as possible. To make it clearer that it could be an abuse of the 'IRQ_CONNECT' API that is causing the issue we add this to the error message. Signed-off-by: Sebastian Bøe --- arch/common/gen_isr_tables.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/common/gen_isr_tables.py b/arch/common/gen_isr_tables.py index b3c1a1d9915..543ed8a6f76 100755 --- a/arch/common/gen_isr_tables.py +++ b/arch/common/gen_isr_tables.py @@ -303,7 +303,9 @@ def main(): table_index = irq1 - offset if swt[table_index] != (0, spurious_handler): - error("multiple registrations at table_index %d for irq %d (0x%x)" % (table_index, irq, irq)) + error(f"multiple registrations at table_index {table_index} for irq {irq} (0x{irq:x})" + + "\nHas IRQ_CONNECT or IRQ_DIRECT_CONNECT accidentally been invoked on the same irq multiple times?" + ) swt[table_index] = (param, func)