U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] libfdt: Drop -FDT_ERR_TOODEEP
@ 2017-07-10  3:30 Simon Glass
  2017-07-10 12:11 ` Peter Robinson
  2017-07-10 17:07 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Simon Glass @ 2017-07-10  3:30 UTC (permalink / raw)
  To: u-boot

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@gmail.com>

Signed-off-by: Simon Glass <sjg@chromium.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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] libfdt: Drop -FDT_ERR_TOODEEP
  2017-07-10  3:30 [U-Boot] [PATCH] libfdt: Drop -FDT_ERR_TOODEEP Simon Glass
@ 2017-07-10 12:11 ` Peter Robinson
  2017-07-10 17:07 ` [U-Boot] " Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Robinson @ 2017-07-10 12:11 UTC (permalink / raw)
  To: u-boot

On Mon, Jul 10, 2017 at 4:30 AM, Simon Glass <sjg@chromium.org> wrote:
> 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@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
> Signed-off-by: Simon Glass <sjg@chromium.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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] libfdt: Drop -FDT_ERR_TOODEEP
  2017-07-10  3:30 [U-Boot] [PATCH] libfdt: Drop -FDT_ERR_TOODEEP Simon Glass
  2017-07-10 12:11 ` Peter Robinson
@ 2017-07-10 17:07 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2017-07-10 17:07 UTC (permalink / raw)
  To: u-boot

On Sun, Jul 09, 2017 at 09:30:17PM -0600, Simon Glass wrote:

> 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@gmail.com>
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Tested-by: Peter Robinson <pbrobinson@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170710/8e2f4277/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-10 17:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-10  3:30 [U-Boot] [PATCH] libfdt: Drop -FDT_ERR_TOODEEP Simon Glass
2017-07-10 12:11 ` Peter Robinson
2017-07-10 17:07 ` [U-Boot] " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox