Skip to contentSkip to conversation

PCI: of: Downgrade error message on missing of_root node

PATCH Superseded Andrea della Porta 2 participants 2 messages Oct 21, 2025 PCI

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: of: Downgrade error message on missing of_root node

When CONFIG_PCI_DYNAMIC_OF_NODES is enabled, an error message is generated if no 'of_root' node is defined.

On DT-based systems, this cannot happen as a root DT node is always present. On ACPI-based systems, this is not a true error because a DT is not used.

Downgrade the pr_err() to pr_info().

---
 drivers/pci/of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/of.c +1 -1
index 3579265f1198..034486593210 100644
@@ -775,7 +775,7 @@ void of_pci_make_host_bridge_node(struct pci_host_bridge *bridge)
 
 	/* Check if there is a DT root node to attach the created node */
 	if (!of_root) {
-		pr_err("of_root node is NULL, cannot create PCI host bridge node\n");
+		pr_info("of_root node is NULL, cannot create PCI host bridge node\n");
 		return;
 	}
 
Signature · 1 line
2.35.3
#1 lore raw
Quoted 19 lines · Andrea della Porta

When CONFIG_PCI_DYNAMIC_OF_NODES is enabled, an error message is generated if no 'of_root' node is defined.

On DT-based systems, this cannot happen as a root DT node is always present. On ACPI-based systems, this is not a true error because a DT is not used.

Downgrade the pr_err() to pr_info().

---
 drivers/pci/of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/of.c +0 -0
index 3579265f1198..034486593210 100644

drivers/pci/of.c void of_pci_make_host_bridge_node(struct pci_host_bridge *bridge) · line 778

Quoted 5 lines
drivers/pci/of.c +1 -1
@@ -775,7 +775,7 @@ void of_pci_make_host_bridge_node(struct pci_host_bridge *bridge)
 
 	/* Check if there is a DT root node to attach the created node */
 	if (!of_root) {
-		pr_err("of_root node is NULL, cannot create PCI host bridge node\n");
+		pr_info("of_root node is NULL, cannot create PCI host bridge node\n");

If we're going to see this message in the normal course of events on ACPI systems, I think maybe we should reword it so it assumes less context. "of_root node" is low-level technical detail that doesn't even make sense to me without digging into the code.