PCI/pwrctl: Decrease message about child OF nodes to debug
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.
--- drivers/pci/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/bus.c +1 -1
@@ -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
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-HDKCc Caleb Connolly <[email protected]> # OnePlus 8TReported-by Praveenkumar Patil <[email protected]>Fixes 8fb18619d910 ("PCI/pwrctl: Create platform devices for child OF nodes of the port node")Signed-off-by Mario Limonciello <[email protected]>--- drivers/pci/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/bus.c +1
-2@@ -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
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-HDKCc Caleb Connolly <[email protected]> # OnePlus 8TReported-by Praveenkumar Patil <[email protected]>Fixes 8fb18619d910 ("PCI/pwrctl: Create platform devices for child OF nodes of the port node")Signed-off-by Mario Limonciello <[email protected]>--- drivers/pci/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/bus.c +1
-2@@ -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-ENODEVinstead...
Quoted 5 lines
Maybe do:
if (retval && retval !=
-ENODEV) and keeppci_err()here?Bart
Sure, fine by me. I'll drop a v2.
Thanks!