* [PATCH v3] of: overlay: log the error cause on resolver failure
@ 2020-02-28 8:40 Luca Ceresoli
2020-02-28 14:28 ` Frank Rowand
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Luca Ceresoli @ 2020-02-28 8:40 UTC (permalink / raw)
To: devicetree
Cc: Geert Uytterhoeven, Pantelis Antoniou, Frank Rowand, Rob Herring,
linux-kernel, Luca Ceresoli
When a DT overlay has a node label that is not present in the live
devicetree symbols table, this error is printed:
OF: resolver: overlay phandle fixup failed: -22
create_overlay: Failed to create overlay (err=-22)
which does not help much in finding the node label that caused the problem
and fix the overlay source.
Add an error message with the name of the node label that caused the
error. The new output is:
OF: resolver: node label 'gpio9' not found in live devicetree symbols table
OF: resolver: overlay phandle fixup failed: -22
create_overlay: Failed to create overlay (err=-22)
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
Changed in v3:
- add only the message from v1, but as reworded by Frank
Changed in v2:
- add a message for each error path that does not have one yet
---
drivers/of/resolver.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/of/resolver.c b/drivers/of/resolver.c
index 83c766233181..b278ab4338ce 100644
--- a/drivers/of/resolver.c
+++ b/drivers/of/resolver.c
@@ -321,8 +321,11 @@ int of_resolve_phandles(struct device_node *overlay)
err = of_property_read_string(tree_symbols,
prop->name, &refpath);
- if (err)
+ if (err) {
+ pr_err("node label '%s' not found in live devicetree symbols table\n",
+ prop->name);
goto out;
+ }
refnode = of_find_node_by_path(refpath);
if (!refnode) {
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3] of: overlay: log the error cause on resolver failure
2020-02-28 8:40 [PATCH v3] of: overlay: log the error cause on resolver failure Luca Ceresoli
@ 2020-02-28 14:28 ` Frank Rowand
2020-03-02 16:06 ` Geert Uytterhoeven
2020-03-02 17:31 ` Rob Herring
2 siblings, 0 replies; 4+ messages in thread
From: Frank Rowand @ 2020-02-28 14:28 UTC (permalink / raw)
To: Luca Ceresoli, devicetree
Cc: Geert Uytterhoeven, Pantelis Antoniou, Rob Herring, linux-kernel
On 2/28/20 2:40 AM, Luca Ceresoli wrote:
> When a DT overlay has a node label that is not present in the live
> devicetree symbols table, this error is printed:
>
> OF: resolver: overlay phandle fixup failed: -22
> create_overlay: Failed to create overlay (err=-22)
>
> which does not help much in finding the node label that caused the problem
> and fix the overlay source.
>
> Add an error message with the name of the node label that caused the
> error. The new output is:
>
> OF: resolver: node label 'gpio9' not found in live devicetree symbols table
> OF: resolver: overlay phandle fixup failed: -22
> create_overlay: Failed to create overlay (err=-22)
>
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Thanks Luca, looks good.
Reviewed-by: Frank Rowand <frank.rowand@sony.com>
-Frank
>
> ---
>
> Changed in v3:
> - add only the message from v1, but as reworded by Frank
>
> Changed in v2:
> - add a message for each error path that does not have one yet
> ---
> drivers/of/resolver.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/of/resolver.c b/drivers/of/resolver.c
> index 83c766233181..b278ab4338ce 100644
> --- a/drivers/of/resolver.c
> +++ b/drivers/of/resolver.c
> @@ -321,8 +321,11 @@ int of_resolve_phandles(struct device_node *overlay)
>
> err = of_property_read_string(tree_symbols,
> prop->name, &refpath);
> - if (err)
> + if (err) {
> + pr_err("node label '%s' not found in live devicetree symbols table\n",
> + prop->name);
> goto out;
> + }
>
> refnode = of_find_node_by_path(refpath);
> if (!refnode) {
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] of: overlay: log the error cause on resolver failure
2020-02-28 8:40 [PATCH v3] of: overlay: log the error cause on resolver failure Luca Ceresoli
2020-02-28 14:28 ` Frank Rowand
@ 2020-03-02 16:06 ` Geert Uytterhoeven
2020-03-02 17:31 ` Rob Herring
2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2020-03-02 16:06 UTC (permalink / raw)
To: Luca Ceresoli
Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Geert Uytterhoeven, Pantelis Antoniou, Frank Rowand, Rob Herring,
Linux Kernel Mailing List
On Fri, Feb 28, 2020 at 9:40 AM Luca Ceresoli <luca@lucaceresoli.net> wrote:
> When a DT overlay has a node label that is not present in the live
> devicetree symbols table, this error is printed:
>
> OF: resolver: overlay phandle fixup failed: -22
> create_overlay: Failed to create overlay (err=-22)
>
> which does not help much in finding the node label that caused the problem
> and fix the overlay source.
>
> Add an error message with the name of the node label that caused the
> error. The new output is:
>
> OF: resolver: node label 'gpio9' not found in live devicetree symbols table
> OF: resolver: overlay phandle fixup failed: -22
> create_overlay: Failed to create overlay (err=-22)
>
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] of: overlay: log the error cause on resolver failure
2020-02-28 8:40 [PATCH v3] of: overlay: log the error cause on resolver failure Luca Ceresoli
2020-02-28 14:28 ` Frank Rowand
2020-03-02 16:06 ` Geert Uytterhoeven
@ 2020-03-02 17:31 ` Rob Herring
2 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2020-03-02 17:31 UTC (permalink / raw)
To: Luca Ceresoli
Cc: devicetree, Geert Uytterhoeven, Pantelis Antoniou, Frank Rowand,
linux-kernel, Luca Ceresoli
On Fri, 28 Feb 2020 09:40:27 +0100, Luca Ceresoli wrote:
> When a DT overlay has a node label that is not present in the live
> devicetree symbols table, this error is printed:
>
> OF: resolver: overlay phandle fixup failed: -22
> create_overlay: Failed to create overlay (err=-22)
>
> which does not help much in finding the node label that caused the problem
> and fix the overlay source.
>
> Add an error message with the name of the node label that caused the
> error. The new output is:
>
> OF: resolver: node label 'gpio9' not found in live devicetree symbols table
> OF: resolver: overlay phandle fixup failed: -22
> create_overlay: Failed to create overlay (err=-22)
>
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
>
> ---
>
> Changed in v3:
> - add only the message from v1, but as reworded by Frank
>
> Changed in v2:
> - add a message for each error path that does not have one yet
> ---
> drivers/of/resolver.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
Applied, thanks.
Rob
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-02 17:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-28 8:40 [PATCH v3] of: overlay: log the error cause on resolver failure Luca Ceresoli
2020-02-28 14:28 ` Frank Rowand
2020-03-02 16:06 ` Geert Uytterhoeven
2020-03-02 17:31 ` Rob Herring
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.