From 2164019f84832099643acc2ff7d296daacbee236 Mon Sep 17 00:00:00 2001 From: Aristo Chen Date: Tue, 12 May 2026 15:23:14 +0200 Subject: [PATCH] checks: Add missing phandle_references prereq to interrupts_property The WARNING macro signature is (name, fn, data, ...prereqs), but interrupts_property was registered with &phandle_references in the data slot instead of as a prereq. Since c->data is const void *, the misuse compiled silently and the check has been running with num_prereqs == 0. The bug is normally masked: many other checks (interrupt_map, gpios_property, omit_unused_nodes, and the *_property checks generated by WARNING_PROPERTY_PHANDLE_CELLS) correctly list phandle_references as a prereq, and run_check recurses into prereqs unconditionally. As long as any one of them is enabled, fixup_phandle_references is pulled in transitively and the parser's 0xffffffff placeholder is replaced with the real phandle before check_interrupts_property reads it. The bug becomes visible when every other consumer of phandle_references is silenced (-Eno-phandle_references plus -Wno- for the *_property, gpios_property and interrupt_map checks). In that case the placeholder remains and interrupts_property falsely reports "Invalid phandle" / "Missing interrupt-parent" on a valid tree. Reordering check_table[] could also expose it under default flags. Add the missing NULL so &phandle_references lands in the prereq slot. Signed-off-by: Aristo Chen Signed-off-by: David Gibson --- checks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checks.c b/checks.c index 946c142..a6037ed 100644 --- a/checks.c +++ b/checks.c @@ -1769,7 +1769,7 @@ static void check_interrupts_property(struct check *c, irq_prop->val.len, (int)(irq_cells * sizeof(cell_t))); } } -WARNING(interrupts_property, check_interrupts_property, &phandle_references); +WARNING(interrupts_property, check_interrupts_property, NULL, &phandle_references); static const struct bus_type graph_port_bus = { .name = "graph-port",