From patchwork Wed Jan 8 20:35:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 239266 List-Id: U-Boot discussion From: agust at denx.de (Anatolij Gustschin) Date: Wed, 8 Jan 2020 21:35:15 +0100 Subject: [PATCH 1/2] fdtgrep: fix typos in error output Message-ID: <20200108203516.22268-1-agust@denx.de> Fix function name and parenthesis. Signed-off-by: Anatolij Gustschin Reviewed-by: Simon Glass --- 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; } From patchwork Wed Jan 8 20:35:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 239267 List-Id: U-Boot discussion From: agust at denx.de (Anatolij Gustschin) Date: Wed, 8 Jan 2020 21:35:16 +0100 Subject: [PATCH 2/2] fdtgrep: fix fdtgrep_find_regions() error with some device trees In-Reply-To: <20200108203516.22268-1-agust@denx.de> References: <20200108203516.22268-1-agust@denx.de> Message-ID: <20200108203516.22268-2-agust@denx.de> 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 Reviewed-by: Simon Glass --- 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;