Skip to contentSkip to conversation

PCI: of: Drop error message on missing of_root node

PATCH Superseded Andrea della Porta 2 participants 2 messages Nov 10, 2025 PCI

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 PCI: of: Drop 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 that declare an empty root DT node (e.g. x86 with CONFIG_OF_EARLY_FLATTREE=y), this also won't happen. On platforms where ACPI is mutually exclusive to DT (e.g. ARM) the error will be caught (and possibly shown) by drivers that rely on the root node.

Drop the error message altogether.

---
Changes in V3:
- Dropped the error message
- Changed the commit subject

V2: https://lore.kernel.org/all/955bc7a9b78678fad4b705c428e8b45aeb0cbf3c.1762367117.git.andrea.porta@suse.com/

---
 drivers/pci/of.c | 1 -
 1 file changed, 1 deletion(-)
drivers/pci/of.c +0 -1
index 3579265f1198..71899b385f7c 100644
@@ -775,7 +775,6 @@ 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");
 		return;
 	}
 
Signature · 1 line
2.35.3
#1 lore raw
Quoted 31 lines · Andrea della Porta

EXTERNAL EMAIL

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 that declare an empty root DT node (e.g. x86 with CONFIG_OF_EARLY_FLATTREE=y), this also won't happen. On platforms where ACPI is mutually exclusive to DT (e.g. ARM) the error will be caught (and possibly shown) by drivers that rely on the root node.

Drop the error message altogether.

---
Changes in V3:
- Dropped the error message
- Changed the commit subject

V2: https://lore.kernel.org/all/955bc7a9b78678fad4b705c428e8b45aeb0cbf3c.1762367117.git.andrea.porta@suse.com/

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

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

Quoted 6 lines
drivers/pci/of.c +0 -1
@@ -775,7 +775,6 @@ 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");
                 return;
         }

Hi,

Can {} also be deleted?

Best regards,
Hans

Quoted 5 lines
drivers/pci/of.c +0 -1
--

2.35.3