devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
To: U-Boot Mailing List <u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org>
Cc: Tom Rini <trini-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
	Peter Robinson
	<pbrobinson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	Devicetree Compiler
	<devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH] libfdt: Drop -FDT_ERR_TOODEEP
Date: Sun,  9 Jul 2017 21:30:17 -0600	[thread overview]
Message-ID: <20170710033017.161092-1-sjg@chromium.org> (raw)

This error code has not been upstreamed and is not really needed since it
is unlikely to be triggered. Drop it to maintain compatability with
upstream.

Reported-by: Peter Robinson <pbrobinson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Signed-off-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---

 lib/libfdt/fdt_region.c | 2 +-
 lib/libfdt/libfdt.h     | 7 +------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/lib/libfdt/fdt_region.c b/lib/libfdt/fdt_region.c
index 8b8a547555..63099f1d96 100644
--- a/lib/libfdt/fdt_region.c
+++ b/lib/libfdt/fdt_region.c
@@ -397,7 +397,7 @@ int fdt_next_region(const void *fdt,
 			last_node = offset;
 			p.depth++;
 			if (p.depth == FDT_MAX_DEPTH)
-				return -FDT_ERR_TOODEEP;
+				return -FDT_ERR_BADSTRUCTURE;
 			name = fdt_get_name(fdt, offset, &len);
 			if (p.end - path + 2 + len >= path_len)
 				return -FDT_ERR_NOSPACE;
diff --git a/lib/libfdt/libfdt.h b/lib/libfdt/libfdt.h
index 2f7ebf8e06..f3f9cad184 100644
--- a/lib/libfdt/libfdt.h
+++ b/lib/libfdt/libfdt.h
@@ -93,12 +93,7 @@
 	/* FDT_ERR_NOPHANDLES: The device tree doesn't have any
 	 * phandle available anymore without causing an overflow */
 
-#define FDT_ERR_TOODEEP	18
-	/* FDT_ERR_TOODEEP: The depth of a node has exceeded the internal
-	 * libfdt limit. This can happen if you have more than
-	 * FDT_MAX_DEPTH nested nodes. */
-
-#define FDT_ERR_MAX		18
+#define FDT_ERR_MAX		17
 
 /**********************************************************************/
 /* Low-level functions (you probably don't need these)                */
-- 
2.13.2.725.g09c95d1e9-goog

             reply	other threads:[~2017-07-10  3:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-10  3:30 Simon Glass [this message]
     [not found] ` <20170710033017.161092-1-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2017-07-10 12:11   ` [PATCH] libfdt: Drop -FDT_ERR_TOODEEP Peter Robinson
2017-07-10 17:07   ` [U-Boot] " Tom Rini

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=20170710033017.161092-1-sjg@chromium.org \
    --to=sjg-f7+t8e8rja9g9huczpvpmw@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pbrobinson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=trini-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
    --cc=u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).