* [PATCH] PCI/pwrctl: Decrease message about child OF nodes to debug
@ 2024-07-02 17:32 superm1
2024-07-02 18:00 ` Bartosz Golaszewski
0 siblings, 1 reply; 3+ messages in thread
From: superm1 @ 2024-07-02 17:32 UTC (permalink / raw)
To: Bjorn Helgaas, Bartosz Golaszewski
Cc: linux-pci, linux-kernel, Mario Limonciello, Amit Pundir,
Neil Armstrong, Caleb Connolly, Praveenkumar Patil
From: Mario Limonciello <mario.limonciello@amd.com>
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 <bartosz.golaszewski@linaro.org>
Cc: Amit Pundir <amit.pundir@linaro.org>
Cc: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD, SM8650-QRD & SM8650-HDK
Cc: Caleb Connolly <caleb.connolly@linaro.org> # OnePlus 8T
Reported-by: Praveenkumar Patil <PraveenKumar.Patil@amd.com>
Fixes: 8fb18619d910 ("PCI/pwrctl: Create platform devices for child OF nodes of the port node")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/pci/bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index e4735428814d..f21c4ec979b5 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -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);
}
}
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] PCI/pwrctl: Decrease message about child OF nodes to debug
2024-07-02 17:32 [PATCH] PCI/pwrctl: Decrease message about child OF nodes to debug superm1
@ 2024-07-02 18:00 ` Bartosz Golaszewski
2024-07-02 18:04 ` Mario Limonciello
0 siblings, 1 reply; 3+ messages in thread
From: Bartosz Golaszewski @ 2024-07-02 18:00 UTC (permalink / raw)
To: superm1
Cc: Bjorn Helgaas, Bartosz Golaszewski, linux-pci, linux-kernel,
Mario Limonciello, Amit Pundir, Neil Armstrong, Caleb Connolly,
Praveenkumar Patil
On Tue, Jul 2, 2024 at 7:33 PM <superm1@kernel.org> wrote:
>
> From: Mario Limonciello <mario.limonciello@amd.com>
>
> 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 <bartosz.golaszewski@linaro.org>
> Cc: Amit Pundir <amit.pundir@linaro.org>
> Cc: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD, SM8650-QRD & SM8650-HDK
> Cc: Caleb Connolly <caleb.connolly@linaro.org> # OnePlus 8T
> Reported-by: Praveenkumar Patil <PraveenKumar.Patil@amd.com>
> Fixes: 8fb18619d910 ("PCI/pwrctl: Create platform devices for child OF nodes of the port node")
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> drivers/pci/bus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
> index e4735428814d..f21c4ec979b5 100644
> --- a/drivers/pci/bus.c
> +++ b/drivers/pci/bus.c
> @@ -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);
> }
> }
> --
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] PCI/pwrctl: Decrease message about child OF nodes to debug
2024-07-02 18:00 ` Bartosz Golaszewski
@ 2024-07-02 18:04 ` Mario Limonciello
0 siblings, 0 replies; 3+ messages in thread
From: Mario Limonciello @ 2024-07-02 18:04 UTC (permalink / raw)
To: Bartosz Golaszewski, superm1
Cc: Bjorn Helgaas, Bartosz Golaszewski, linux-pci, linux-kernel,
Amit Pundir, Neil Armstrong, Caleb Connolly, Praveenkumar Patil
On 7/2/2024 13:00, Bartosz Golaszewski wrote:
> On Tue, Jul 2, 2024 at 7:33 PM <superm1@kernel.org> wrote:
>>
>> From: Mario Limonciello <mario.limonciello@amd.com>
>>
>> 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 <bartosz.golaszewski@linaro.org>
>> Cc: Amit Pundir <amit.pundir@linaro.org>
>> Cc: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD, SM8650-QRD & SM8650-HDK
>> Cc: Caleb Connolly <caleb.connolly@linaro.org> # OnePlus 8T
>> Reported-by: Praveenkumar Patil <PraveenKumar.Patil@amd.com>
>> Fixes: 8fb18619d910 ("PCI/pwrctl: Create platform devices for child OF nodes of the port node")
>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>> ---
>> drivers/pci/bus.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
>> index e4735428814d..f21c4ec979b5 100644
>> --- a/drivers/pci/bus.c
>> +++ b/drivers/pci/bus.c
>> @@ -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);
>> }
>> }
>> --
>> 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
Sure, fine by me. I'll drop a v2.
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-02 18:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-02 17:32 [PATCH] PCI/pwrctl: Decrease message about child OF nodes to debug superm1
2024-07-02 18:00 ` Bartosz Golaszewski
2024-07-02 18:04 ` Mario Limonciello
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox