[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <37e8707f-a351-7979-98f5-36c5c30a16dd@gmail.com>
Date: Fri, 28 Feb 2020 08:28:58 -0600
From: Frank Rowand <frowand.list@...il.com>
To: Luca Ceresoli <luca@...aceresoli.net>, devicetree@...r.kernel.org
Cc: Geert Uytterhoeven <geert+renesas@...der.be>,
Pantelis Antoniou <pantelis.antoniou@...sulko.com>,
Rob Herring <robh+dt@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] of: overlay: log the error cause on resolver failure
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@...aceresoli.net>
Thanks Luca, looks good.
Reviewed-by: Frank Rowand <frank.rowand@...y.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) {
>
Powered by blists - more mailing lists