Skip to contentSkip to conversation

PCI/pwrctl: Decrease message about child OF nodes to debug

PATCH In review [email protected] 3 participants 3 messages Jul 2, 2024 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI/pwrctl: Decrease message about child OF nodes to debug

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, so downgrade it to debug instead.

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")
---
 drivers/pci/bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/bus.c +1 -1
index e4735428814d..f21c4ec979b5 100644
@@ -354,7 +354,7 @@ void pci_bus_add_device(struct pci_dev *dev)
 		retval = of_platform_populate(dev->dev.of_node, NULL, NULL,
 					      &dev->dev);
 		if (retval)
-			pci_err(dev, "failed to populate child OF nodes (%d)\n",
+			pci_dbg(dev, "failed to populate child OF nodes (%d)\n",
 				retval);
 	}
 }
Signature · 1 line
2.43.0
#1 lore raw
Quoted 33 lines · On Tue, Jul 2, 2024 at 7:33 PM <[email protected]> wrote:

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, so downgrade it to debug instead.

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")
---
 drivers/pci/bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/bus.c +1 -2
index e4735428814d..f21c4ec979b5 100644
@@ -354,7 +354,7 @@ void pci_bus_add_device(struct pci_dev *dev)
                retval = of_platform_populate(dev->dev.of_node, NULL, NULL,
                                              &dev->dev);
                if (retval)
-                       pci_err(dev, "failed to populate child OF nodes (%d)\n",
+                       pci_dbg(dev, "failed to populate child OF nodes (%d)\n",
                                retval);
        }
 }
--
Quoted 3 lines

2.43.0

Ah! I was under the impression that of_platform_populate() would return 0 with !OF but it returns -ENODEV instead...

Maybe do:

if (retval && retval != -ENODEV) and keep pci_err() here?

Bart

#2 lore raw
Quoted 41 lines · Bartosz Golaszewski
Quoted 33 lines · On Tue, Jul 2, 2024 at 7:33 PM <[email protected]> wrote:

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, so downgrade it to debug instead.

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")
---
  drivers/pci/bus.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/bus.c +1 -2
index e4735428814d..f21c4ec979b5 100644
@@ -354,7 +354,7 @@ void pci_bus_add_device(struct pci_dev *dev)
                 retval = of_platform_populate(dev->dev.of_node, NULL, NULL,
                                               &dev->dev);
                 if (retval)
-                       pci_err(dev, "failed to populate child OF nodes (%d)\n",
+                       pci_dbg(dev, "failed to populate child OF nodes (%d)\n",
                                 retval);
         }
  }
--
Quoted 3 lines

2.43.0

Ah! I was under the impression that of_platform_populate() would return 0 with !OF but it returns -ENODEV instead...

Quoted 5 lines

Maybe do:

if (retval && retval != -ENODEV) and keep pci_err() here?

Bart

Sure, fine by me. I'll drop a v2.

Thanks!