From: Bjorn Helgaas <helgaas@kernel.org>
To: Andrea della Porta <andrea.porta@suse.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
mbrugger@suse.com, guillaume.gardet@arm.com, tiwai@suse.com,
Lizhi Hou <lizhi.hou@amd.com>
Subject: Re: [PATCH v2] PCI: of: Downgrade error message on missing of_root node
Date: Wed, 5 Nov 2025 18:23:45 -0600 [thread overview]
Message-ID: <20251106002345.GA1934302@bhelgaas> (raw)
In-Reply-To: <955bc7a9b78678fad4b705c428e8b45aeb0cbf3c.1762367117.git.andrea.porta@suse.com>
[+cc Lizhi]
On Wed, Nov 05, 2025 at 07:33:40PM +0100, Andrea della Porta wrote:
> 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, this is not a true error
> because a DT is not used.
>
> Downgrade the pr_err() to pr_info() and reword the message text
> to be less context specific.
of_pci_make_host_bridge_node() is called in the very generic
pci_register_host_bridge() path. Does that mean every boot of a
kernel with CONFIG_PCI_DYNAMIC_OF_NODES on a non-DT system will see
this message?
This message seems like something that will generate user questions.
Or is this really an error, and we were supposed to have created
of_root somewhere but it failed? If so, I would expect a message
where the of_root creation failed.
I guess I'm confused about what the point of this message is. If it's
just a hint that loading an overlay in the future will fail, I assume
we would emit a message at that time, connected with the user action
of trying to load the overlay.
What badness would ensue if we downgraded this message even further
and removed it completely?
> Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
> ---
> CHANGES in V2:
>
> * message text reworded to be less context specific (Bjorn)
> ---
> drivers/pci/of.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/of.c b/drivers/pci/of.c
> index 3579265f1198..872c36b195e3 100644
> --- a/drivers/pci/of.c
> +++ b/drivers/pci/of.c
> @@ -775,7 +775,7 @@ 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");
> + pr_info("Missing DeviceTree, cannot create PCI host bridge node\n");
> return;
> }
>
> --
> 2.35.3
>
next prev parent reply other threads:[~2025-11-06 0:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-05 18:33 [PATCH v2] PCI: of: Downgrade error message on missing of_root node Andrea della Porta
2025-11-06 0:23 ` Bjorn Helgaas [this message]
2025-11-06 11:04 ` Andrea della Porta
2025-11-06 12:18 ` Herve Codina
2025-11-06 15:21 ` Andrea della Porta
2025-11-06 17:27 ` Herve Codina
2025-11-06 17:50 ` Bjorn Helgaas
2025-11-07 9:32 ` Andrea della Porta
2025-11-07 11:58 ` Herve Codina
2025-12-05 13:58 ` Rob Herring
2026-02-09 18:19 ` Andrea della Porta
2025-11-07 9:26 ` Andrea della Porta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251106002345.GA1934302@bhelgaas \
--to=helgaas@kernel.org \
--cc=andrea.porta@suse.com \
--cc=bhelgaas@google.com \
--cc=guillaume.gardet@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lizhi.hou@amd.com \
--cc=mbrugger@suse.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox