Skip to contentSkip to conversation

PCI/pwrctl: Don't show error when missing OF nodes

PATCH Applied [email protected] 2 participants 2 messages Jul 2, 2024 – Jul 3, 2024 PCI

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 PCI/pwrctl: Don't show error when missing OF nodes

From: Mario Limonciello <[email protected]>

commit 8fb18619d910 ("PCI/pwrctl: Create platform devices for child OF nodes of the port node") introduced a new error message about populating OF nodes. This message isn't relevant on non-OF platforms and of_platform_populate() returns -ENODEV in this case, so don't show the message on non-OF platforms.

Cc Bartosz Golaszewski <[email protected]>
Cc Amit Pundir <[email protected]>
Cc Neil Armstrong <[email protected]> # on SM8550-QRD, SM8650-QRD & SM8650-HDK
Cc Caleb Connolly <[email protected]> # OnePlus 8T
Fixes 8fb18619d910 ("PCI/pwrctl: Create platform devices for child OF nodes of the port node")

---
v1->v2:
* Catch -ENODEV case instead (Bartosz)

---
 drivers/pci/bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/bus.c +1 -1
index e4735428814d..231bc796ba04 100644
@@ -353,7 +353,7 @@ void pci_bus_add_device(struct pci_dev *dev)
 	if (pci_is_bridge(dev)) {
 		retval = of_platform_populate(dev->dev.of_node, NULL, NULL,
 					      &dev->dev);
-		if (retval)
+		if (retval && retval != -ENODEV)
 			pci_err(dev, "failed to populate child OF nodes (%d)\n",
 				retval);
 	}
Signature · 1 line
2.43.0
#1 lore raw

From: Bartosz Golaszewski <[email protected]>

Quoted 8 lines · On Tue, 02 Jul 2024 13:08:39 -0500, [email protected] wrote:

commit 8fb18619d910 ("PCI/pwrctl: Create platform devices for child OF nodes of the port node") introduced a new error message about populating OF nodes. This message isn't relevant on non-OF platforms and of_platform_populate() returns -ENODEV in this case, so don't show the message on non-OF platforms.

[...]

Applied, thanks!

[1/1] PCI/pwrctl: Don't show error when missing OF nodes

      commit: ba6294d28c428098e99a4139cde12ddb7e77bfa1

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>