* [PATCH 1/2] fdtgrep: fix typos in error output
@ 2020-01-08 20:35 Anatolij Gustschin
2020-01-08 20:35 ` [PATCH 2/2] fdtgrep: fix fdtgrep_find_regions() error with some device trees Anatolij Gustschin
2020-01-09 20:04 ` [PATCH 1/2] fdtgrep: fix typos in error output Simon Glass
0 siblings, 2 replies; 6+ messages in thread
From: Anatolij Gustschin @ 2020-01-08 20:35 UTC (permalink / raw)
To: u-boot
Fix function name and parenthesis.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
tools/fdtgrep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/fdtgrep.c b/tools/fdtgrep.c
index 8f44f599c1..052d419692 100644
--- a/tools/fdtgrep.c
+++ b/tools/fdtgrep.c
@@ -824,7 +824,7 @@ static int do_fdtgrep(struct display_info *disp, const char *filename)
if (count <= max_regions)
break;
free(region);
- fprintf(stderr, "Internal error with fdtgrep_find_region)(\n");
+ fprintf(stderr, "Internal error with fdtgrep_find_regions()\n");
return -1;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] fdtgrep: fix fdtgrep_find_regions() error with some device trees
2020-01-08 20:35 [PATCH 1/2] fdtgrep: fix typos in error output Anatolij Gustschin
@ 2020-01-08 20:35 ` Anatolij Gustschin
2020-01-09 20:04 ` Simon Glass
2020-01-09 20:04 ` [PATCH 1/2] fdtgrep: fix typos in error output Simon Glass
1 sibling, 1 reply; 6+ messages in thread
From: Anatolij Gustschin @ 2020-01-08 20:35 UTC (permalink / raw)
To: u-boot
With some device trees (i.e. i.MX6 SoC) and longer REMOVE_PROPS list
the fdtgrep tool stops with "Internal error with fdtgrep_find_regions()".
Increase 'max_regions' count to avoid such errors.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
tools/fdtgrep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/fdtgrep.c b/tools/fdtgrep.c
index 052d419692..8f71b1cd7f 100644
--- a/tools/fdtgrep.c
+++ b/tools/fdtgrep.c
@@ -778,7 +778,7 @@ static int do_fdtgrep(struct display_info *disp, const char *filename)
{
struct fdt_region *region = NULL;
int max_regions;
- int count = 100;
+ int count = 110;
char path[1024];
char *blob;
int i, ret;
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 1/2] fdtgrep: fix typos in error output
2020-01-08 20:35 [PATCH 1/2] fdtgrep: fix typos in error output Anatolij Gustschin
2020-01-08 20:35 ` [PATCH 2/2] fdtgrep: fix fdtgrep_find_regions() error with some device trees Anatolij Gustschin
@ 2020-01-09 20:04 ` Simon Glass
1 sibling, 0 replies; 6+ messages in thread
From: Simon Glass @ 2020-01-09 20:04 UTC (permalink / raw)
To: u-boot
On Thu, 9 Jan 2020 at 09:35, Anatolij Gustschin <agust@denx.de> wrote:
>
> Fix function name and parenthesis.
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
> tools/fdtgrep.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] fdtgrep: fix fdtgrep_find_regions() error with some device trees
2020-01-08 20:35 ` [PATCH 2/2] fdtgrep: fix fdtgrep_find_regions() error with some device trees Anatolij Gustschin
@ 2020-01-09 20:04 ` Simon Glass
2020-01-10 7:58 ` Patrick DELAUNAY
0 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2020-01-09 20:04 UTC (permalink / raw)
To: u-boot
On Thu, 9 Jan 2020 at 09:35, Anatolij Gustschin <agust@denx.de> wrote:
>
> With some device trees (i.e. i.MX6 SoC) and longer REMOVE_PROPS list
> the fdtgrep tool stops with "Internal error with fdtgrep_find_regions()".
> Increase 'max_regions' count to avoid such errors.
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
> tools/fdtgrep.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
Wow that's a lot. I wonder if we should adjust it to be unlimited?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] fdtgrep: fix fdtgrep_find_regions() error with some device trees
2020-01-09 20:04 ` Simon Glass
@ 2020-01-10 7:58 ` Patrick DELAUNAY
2020-01-12 19:43 ` Anatolij Gustschin
0 siblings, 1 reply; 6+ messages in thread
From: Patrick DELAUNAY @ 2020-01-10 7:58 UTC (permalink / raw)
To: u-boot
Hi,
> From: U-Boot <u-boot-bounces@lists.denx.de> On Behalf Of Simon Glass
> Sent: jeudi 9 janvier 2020 21:04
>
> On Thu, 9 Jan 2020 at 09:35, Anatolij Gustschin <agust@denx.de> wrote:
> >
> > With some device trees (i.e. i.MX6 SoC) and longer REMOVE_PROPS list
> > the fdtgrep tool stops with "Internal error with fdtgrep_find_regions()".
> > Increase 'max_regions' count to avoid such errors.
> >
> > Signed-off-by: Anatolij Gustschin <agust@denx.de>
> > ---
> > tools/fdtgrep.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
>
> Wow that's a lot. I wonder if we should adjust it to be unlimited?
I see the same issue for device-tree when number of pincontrol node > 100 in SPL
(only see for debug use case).
But normally it is managed in the function
(2 loops and re-alloc for the second loop if size > 100).
But the loop is not correctly managed, I think it is a issue introduced by
Commit e178db1d7736a92951fdc7f1fd9b8ecf4d2877ba
fdtgrep: Fix logic of free() in do_fdtgrep()
=> retrun -1 added for the 1rst loop.
I have locally a patch, but I don't yet upstream it....
It is done today with:
"tools: ftdgrep: correct the find regions loop in do_fdtgrep"
http://patchwork.ozlabs.org/project/uboot/list/?series=152371
Anatolij can you confirm that my patch correct also your issue ?
Regards
Patrick
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] fdtgrep: fix fdtgrep_find_regions() error with some device trees
2020-01-10 7:58 ` Patrick DELAUNAY
@ 2020-01-12 19:43 ` Anatolij Gustschin
0 siblings, 0 replies; 6+ messages in thread
From: Anatolij Gustschin @ 2020-01-12 19:43 UTC (permalink / raw)
To: u-boot
Hi Patrick,
On Fri, 10 Jan 2020 07:58:41 +0000
Patrick DELAUNAY patrick.delaunay at st.com wrote:
...
> I have locally a patch, but I don't yet upstream it....
> It is done today with:
> "tools: ftdgrep: correct the find regions loop in do_fdtgrep"
> http://patchwork.ozlabs.org/project/uboot/list/?series=152371
>
> Anatolij can you confirm that my patch correct also your issue ?
Yes, your patch helps. Thanks!
--
Anatolij
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-01-12 19:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-08 20:35 [PATCH 1/2] fdtgrep: fix typos in error output Anatolij Gustschin
2020-01-08 20:35 ` [PATCH 2/2] fdtgrep: fix fdtgrep_find_regions() error with some device trees Anatolij Gustschin
2020-01-09 20:04 ` Simon Glass
2020-01-10 7:58 ` Patrick DELAUNAY
2020-01-12 19:43 ` Anatolij Gustschin
2020-01-09 20:04 ` [PATCH 1/2] fdtgrep: fix typos in error output Simon Glass
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox