History log of /u-boot/tools/fdtgrep.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 7a06cc20 17-Dec-2023 Simon Glass <sjg@chromium.org>

fdtgrep: Allow propagating properties up to supernodes

The existing bootph binding is defined such that properties in a
subnode are also implied in the supernode also, as in this example:

buttons {
/* bootph,pre-ram is implied by btn1 */
compatible = "gpio-keys";

btn1 {
bootph,pre-ram;
gpios = <&gpio_a 3 0>;
label = "button1";
linux,code = <BTN_1>;
};

Provide an option to implement this in fdtgrep.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 61a695e4 17-Dec-2023 Simon Glass <sjg@chromium.org>

fdtgrep: Move property checking into a function

The h_include() function includes a piece which checks if a node
contains a property being searched for. Move this into its own
function to reduce the size of the h_include() function.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 490afe74 17-Dec-2023 Simon Glass <sjg@chromium.org>

fdtgrep: Simplify code to inverting the match

The code to invert the match in h_include() is a bit convoluted.
Simplify it by using disp->invert only once.

Signed-off-by: Simon Glass <sjg@chromium.org>

# b1823ed1 17-Dec-2023 Simon Glass <sjg@chromium.org>

fdtgrep: Tidy up comment for h_include()

Copy the comment from fdt_first_region() so that it is clear what value
this function returns.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f3acd206 17-Dec-2023 Simon Glass <sjg@chromium.org>

fdtgrep: Correct references to fdt_find_regions()

The function name is actually fdtgrep_find_regions() so update the name
in comments accordinging.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 9dab5bd3 17-Dec-2023 Simon Glass <sjg@chromium.org>

fdtgrep: Correct ordering of flags

Two of the flags are out of order, so fix this.

Also adjust the ordering of one flag in the main switch()

Signed-off-by: Simon Glass <sjg@chromium.org>

# 233a6137 17-Dec-2023 Simon Glass <sjg@chromium.org>

fdtgrep: Tidy up a few type warnings and comments

Align the code with the upstream version at fdt-tools which had a few
tweaks before being applied.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 4b95e840 23-Nov-2022 Mikhail Ilin <ilin.mikhail.ol@gmail.com>

tools: fdtgrep: Fix handle leak

The handle "fd" was created in fdtgrep.c:708 by calling the
"open" function and is lost in fdtgrep.c:716 and fdtgrep.c:723.
Close file descriptor 'fd' before exiting with an error from function
utilfdt_read_err_len(const char *filename, char **buffp, off_t *len).

Fixes: 1043d0a0296a ("fdt: Add fdtgrep tool")
Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 70ab7b17 08-Dec-2021 Simon Glass <sjg@chromium.org>

fdtgrep: Correct alignment of struct section

When outputting a devicetree we should not align the struct section to a
16-byte boundary. The normal position is fine, which is 8-byte aligned.

This avoids leaving adding 8 extra zero bytes in the output tree in the
case where the reserved section is empty (i.e has 16 zero bytes).

Signed-off-by: Simon Glass <sjg@chromium.org>

# ac549ac8 10-Feb-2021 Samuel Dionne-Riel <samuel@dionne-riel.com>

tools: fdtgrep: Use unsigned chars for arrays

Otherwise, values over 127 end up prefixed with ffffff.

Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>

# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>

# dd0ee9ea 12-Jun-2018 Simon Glass <sjg@chromium.org>

fdtgrep: Separate out checking of two allocations

The current code might succeed on the first allocation and fail on the
second. Separate the checks to avoid this problem.

Of course, free() will never fail and the chances that (when allocating
two small areas) one will succeed and one will fail are just as remote.
But this keeps coverity happy.

Reported-by: Coverity (CID: 131226)

Signed-off-by: Simon Glass <sjg@chromium.org>

# e178db1d 12-Jun-2018 Simon Glass <sjg@chromium.org>

fdtgrep: Fix logic of free() in do_fdtgrep()

This loop never actually exits, but the way the code is written this is
not obvious. Add an explicit error check.

Reported-by: Coverity (CID: 131280)
Signed-off-by: Simon Glass <sjg@chromium.org>
[trini: Add explicit init of region to NULL per LLVM warning]
Signed-off-by: Tom Rini <trini@konsulko.com>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# d2bf1152 21-Jan-2018 Masahiro Yamada <masahiroy@kernel.org>

tools: include necessary headers explicitly

Several host-tools use "bool" type without including <stdbool.h>.
This relies on the crappy header inclusion chain.

tools/Makefile has the following line:

HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \

All host-tools are forced to include libfdt_env.h even if they are
totally unrelated to FDT. Then, <stdbool.h> is indirectly included
as follows:

include/libfdt_env.h
-> include/linux/types.h
-> <stdbool.h>

I am fixing this horrible crap. In advance, I need to add necessary
include directives explicitly. tools/fdtgrep.c needs more; <fctl.h>
for open() and <errno.h> for errno.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# ae9ace70 21-Jan-2018 Masahiro Yamada <masahiroy@kernel.org>

libfdt: migrate fdt_rw.c to a wrapper of scripts/dtc/libfdt/fdt_rw.c

The only difference between scripts/dtc/libfdt/fdt_rw.c and
lib/libfdt/fdt_rw.c is fdt_remove_unused_strings().

It is only used by fdtgrep, so we do not need to compile it for U-Boot
image. Move it to tools/libfdt/fdw_rw.c so that lib/libfdt/fdt_rw.c
can be a wrapper of scripts/dtc/libfdt/fdt_rw.c.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# b95a5190 02-Nov-2017 Jan Kundrát <jan.kundrat@cesnet.cz>

Do not attempt to use the systemwide libfdt

U-Boot bundles a patched copy of libfdt, so it's wrong to attempt to
include it <like/this>. This breaks the build for me when I have dtc
fully installed in my host -- as happened earlier tonight with
Buildroot, for example.

There are several other occurrences throughout the code where '<libfdt'
matches. I'm not modifying these because I have no clue why the
<systemwide> include style is being used -- IMHO wrongly.

Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>

# 96725153 07-Jun-2017 Simon Glass <sjg@chromium.org>

fdtgrep: Deal with NULL data passed to check_type_include()

Since the parameter can be NULL we must be careful not to dereference it
in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Coverity (CID: 163250)
Fixes: 1043d0a0 (fdt: Add fdtgrep tool)

# c47a38b4 02-Apr-2017 Simon Glass <sjg@chromium.org>

fdtgrep: Cope with the /aliases node being last

With skeleton.dtsi being dropped it is more likely that the /aliases node
will be last in the device tree. Update fdtgrep to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# fc0b5948 07-Sep-2016 Robert P. J. Day <rpjday@crashcourse.ca>

Various, accumulated typos collected from around the tree.

Fix various misspellings of:

* deprecated
* partition
* preceding,preceded
* preparation
* its versus it's
* export
* existing
* scenario
* redundant
* remaining
* value
* architecture

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Stefan Roese <sr@denx.de>

# 9404fc85 06-Mar-2016 Simon Glass <sjg@chromium.org>

fdtgrep: Improve error handling with invalid device tree

This tool requires that the aliases node be the first node in the tree. But
when it is not, it does not handle things gracefully. In fact it crashes.

Fix this, and add a more helpful error message.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# f403914d 17-Oct-2015 Simon Glass <sjg@chromium.org>

fdtgrep: Simplify the alias generation code

We don't need to allocate a new region list when we run out of space.
The outer function can take care of this for us.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# 1043d0a0 23-Jun-2015 Simon Glass <sjg@chromium.org>

fdt: Add fdtgrep tool

This tool allows us to extract subsets of a device tree file. It is used by
the SPL vuild, which needs to cut down the device tree size for use in
limited memory.

This tool was originally written for libfdt but it has not been accepted
upstream, so for now, include it in U-Boot. Several utilfdt library
functions been included inline here.

If fdtgrep is eventually accepted in libfdt then we can bring that version
of libfdt in here, and drop fdtgrep (requiring that fdtgrep is provided by
the user).

If it is not accepted then another approach would be to write a special
tool for chopping down device tree files for SPL. While it would use the
same libfdt support, it would be less code than fdtgrep.c because it would
not have general-purpose functions.

Another approach (which was used with v1 of this series) is to sprinkler all
the device tree files with #ifdef. I don't like that idea.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 4b95e840 23-Nov-2022 Mikhail Ilin <ilin.mikhail.ol@gmail.com>

tools: fdtgrep: Fix handle leak

The handle "fd" was created in fdtgrep.c:708 by calling the
"open" function and is lost in fdtgrep.c:716 and fdtgrep.c:723.
Close file descriptor 'fd' before exiting with an error from function
utilfdt_read_err_len(const char *filename, char **buffp, off_t *len).

Fixes: 1043d0a0296a ("fdt: Add fdtgrep tool")
Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 70ab7b17 08-Dec-2021 Simon Glass <sjg@chromium.org>

fdtgrep: Correct alignment of struct section

When outputting a devicetree we should not align the struct section to a
16-byte boundary. The normal position is fine, which is 8-byte aligned.

This avoids leaving adding 8 extra zero bytes in the output tree in the
case where the reserved section is empty (i.e has 16 zero bytes).

Signed-off-by: Simon Glass <sjg@chromium.org>

# ac549ac8 10-Feb-2021 Samuel Dionne-Riel <samuel@dionne-riel.com>

tools: fdtgrep: Use unsigned chars for arrays

Otherwise, values over 127 end up prefixed with ffffff.

Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>

# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 64045a6a 16-Apr-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>

# dd0ee9ea 12-Jun-2018 Simon Glass <sjg@chromium.org>

fdtgrep: Separate out checking of two allocations

The current code might succeed on the first allocation and fail on the
second. Separate the checks to avoid this problem.

Of course, free() will never fail and the chances that (when allocating
two small areas) one will succeed and one will fail are just as remote.
But this keeps coverity happy.

Reported-by: Coverity (CID: 131226)

Signed-off-by: Simon Glass <sjg@chromium.org>

# e178db1d 12-Jun-2018 Simon Glass <sjg@chromium.org>

fdtgrep: Fix logic of free() in do_fdtgrep()

This loop never actually exits, but the way the code is written this is
not obvious. Add an explicit error check.

Reported-by: Coverity (CID: 131280)
Signed-off-by: Simon Glass <sjg@chromium.org>
[trini: Add explicit init of region to NULL per LLVM warning]
Signed-off-by: Tom Rini <trini@konsulko.com>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# d2bf1152 21-Jan-2018 Masahiro Yamada <yamada.masahiro@socionext.com>

tools: include necessary headers explicitly

Several host-tools use "bool" type without including <stdbool.h>.
This relies on the crappy header inclusion chain.

tools/Makefile has the following line:

HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \

All host-tools are forced to include libfdt_env.h even if they are
totally unrelated to FDT. Then, <stdbool.h> is indirectly included
as follows:

include/libfdt_env.h
-> include/linux/types.h
-> <stdbool.h>

I am fixing this horrible crap. In advance, I need to add necessary
include directives explicitly. tools/fdtgrep.c needs more; <fctl.h>
for open() and <errno.h> for errno.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# ae9ace70 21-Jan-2018 Masahiro Yamada <yamada.masahiro@socionext.com>

libfdt: migrate fdt_rw.c to a wrapper of scripts/dtc/libfdt/fdt_rw.c

The only difference between scripts/dtc/libfdt/fdt_rw.c and
lib/libfdt/fdt_rw.c is fdt_remove_unused_strings().

It is only used by fdtgrep, so we do not need to compile it for U-Boot
image. Move it to tools/libfdt/fdw_rw.c so that lib/libfdt/fdt_rw.c
can be a wrapper of scripts/dtc/libfdt/fdt_rw.c.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# b95a5190 02-Nov-2017 Jan Kundrát <jan.kundrat@cesnet.cz>

Do not attempt to use the systemwide libfdt

U-Boot bundles a patched copy of libfdt, so it's wrong to attempt to
include it <like/this>. This breaks the build for me when I have dtc
fully installed in my host -- as happened earlier tonight with
Buildroot, for example.

There are several other occurrences throughout the code where '<libfdt'
matches. I'm not modifying these because I have no clue why the
<systemwide> include style is being used -- IMHO wrongly.

Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>

# 96725153 07-Jun-2017 Simon Glass <sjg@chromium.org>

fdtgrep: Deal with NULL data passed to check_type_include()

Since the parameter can be NULL we must be careful not to dereference it
in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Coverity (CID: 163250)
Fixes: 1043d0a0 (fdt: Add fdtgrep tool)

# c47a38b4 02-Apr-2017 Simon Glass <sjg@chromium.org>

fdtgrep: Cope with the /aliases node being last

With skeleton.dtsi being dropped it is more likely that the /aliases node
will be last in the device tree. Update fdtgrep to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# fc0b5948 07-Sep-2016 Robert P. J. Day <rpjday@crashcourse.ca>

Various, accumulated typos collected from around the tree.

Fix various misspellings of:

* deprecated
* partition
* preceding,preceded
* preparation
* its versus it's
* export
* existing
* scenario
* redundant
* remaining
* value
* architecture

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Stefan Roese <sr@denx.de>

# 9404fc85 06-Mar-2016 Simon Glass <sjg@chromium.org>

fdtgrep: Improve error handling with invalid device tree

This tool requires that the aliases node be the first node in the tree. But
when it is not, it does not handle things gracefully. In fact it crashes.

Fix this, and add a more helpful error message.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# f403914d 17-Oct-2015 Simon Glass <sjg@chromium.org>

fdtgrep: Simplify the alias generation code

We don't need to allocate a new region list when we run out of space.
The outer function can take care of this for us.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# 1043d0a0 23-Jun-2015 Simon Glass <sjg@chromium.org>

fdt: Add fdtgrep tool

This tool allows us to extract subsets of a device tree file. It is used by
the SPL vuild, which needs to cut down the device tree size for use in
limited memory.

This tool was originally written for libfdt but it has not been accepted
upstream, so for now, include it in U-Boot. Several utilfdt library
functions been included inline here.

If fdtgrep is eventually accepted in libfdt then we can bring that version
of libfdt in here, and drop fdtgrep (requiring that fdtgrep is provided by
the user).

If it is not accepted then another approach would be to write a special
tool for chopping down device tree files for SPL. While it would use the
same libfdt support, it would be less code than fdtgrep.c because it would
not have general-purpose functions.

Another approach (which was used with v1 of this series) is to sprinkler all
the device tree files with #ifdef. I don't like that idea.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 70ab7b17 08-Dec-2021 Simon Glass <sjg@chromium.org>

fdtgrep: Correct alignment of struct section

When outputting a devicetree we should not align the struct section to a
16-byte boundary. The normal position is fine, which is 8-byte aligned.

This avoids leaving adding 8 extra zero bytes in the output tree in the
case where the reserved section is empty (i.e has 16 zero bytes).

Signed-off-by: Simon Glass <sjg@chromium.org>

# ac549ac8 10-Feb-2021 Samuel Dionne-Riel <samuel@dionne-riel.com>

tools: fdtgrep: Use unsigned chars for arrays

Otherwise, values over 127 end up prefixed with ffffff.

Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>

# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>

# dd0ee9ea 12-Jun-2018 Simon Glass <sjg@chromium.org>

fdtgrep: Separate out checking of two allocations

The current code might succeed on the first allocation and fail on the
second. Separate the checks to avoid this problem.

Of course, free() will never fail and the chances that (when allocating
two small areas) one will succeed and one will fail are just as remote.
But this keeps coverity happy.

Reported-by: Coverity (CID: 131226)

Signed-off-by: Simon Glass <sjg@chromium.org>

# e178db1d 12-Jun-2018 Simon Glass <sjg@chromium.org>

fdtgrep: Fix logic of free() in do_fdtgrep()

This loop never actually exits, but the way the code is written this is
not obvious. Add an explicit error check.

Reported-by: Coverity (CID: 131280)
Signed-off-by: Simon Glass <sjg@chromium.org>
[trini: Add explicit init of region to NULL per LLVM warning]
Signed-off-by: Tom Rini <trini@konsulko.com>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# d2bf1152 21-Jan-2018 Masahiro Yamada <yamada.masahiro@socionext.com>

tools: include necessary headers explicitly

Several host-tools use "bool" type without including <stdbool.h>.
This relies on the crappy header inclusion chain.

tools/Makefile has the following line:

HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \

All host-tools are forced to include libfdt_env.h even if they are
totally unrelated to FDT. Then, <stdbool.h> is indirectly included
as follows:

include/libfdt_env.h
-> include/linux/types.h
-> <stdbool.h>

I am fixing this horrible crap. In advance, I need to add necessary
include directives explicitly. tools/fdtgrep.c needs more; <fctl.h>
for open() and <errno.h> for errno.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# ae9ace70 21-Jan-2018 Masahiro Yamada <yamada.masahiro@socionext.com>

libfdt: migrate fdt_rw.c to a wrapper of scripts/dtc/libfdt/fdt_rw.c

The only difference between scripts/dtc/libfdt/fdt_rw.c and
lib/libfdt/fdt_rw.c is fdt_remove_unused_strings().

It is only used by fdtgrep, so we do not need to compile it for U-Boot
image. Move it to tools/libfdt/fdw_rw.c so that lib/libfdt/fdt_rw.c
can be a wrapper of scripts/dtc/libfdt/fdt_rw.c.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# b95a5190 02-Nov-2017 Jan Kundrát <jan.kundrat@cesnet.cz>

Do not attempt to use the systemwide libfdt

U-Boot bundles a patched copy of libfdt, so it's wrong to attempt to
include it <like/this>. This breaks the build for me when I have dtc
fully installed in my host -- as happened earlier tonight with
Buildroot, for example.

There are several other occurrences throughout the code where '<libfdt'
matches. I'm not modifying these because I have no clue why the
<systemwide> include style is being used -- IMHO wrongly.

Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>

# 96725153 07-Jun-2017 Simon Glass <sjg@chromium.org>

fdtgrep: Deal with NULL data passed to check_type_include()

Since the parameter can be NULL we must be careful not to dereference it
in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Coverity (CID: 163250)
Fixes: 1043d0a0 (fdt: Add fdtgrep tool)

# c47a38b4 02-Apr-2017 Simon Glass <sjg@chromium.org>

fdtgrep: Cope with the /aliases node being last

With skeleton.dtsi being dropped it is more likely that the /aliases node
will be last in the device tree. Update fdtgrep to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# fc0b5948 07-Sep-2016 Robert P. J. Day <rpjday@crashcourse.ca>

Various, accumulated typos collected from around the tree.

Fix various misspellings of:

* deprecated
* partition
* preceding,preceded
* preparation
* its versus it's
* export
* existing
* scenario
* redundant
* remaining
* value
* architecture

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Stefan Roese <sr@denx.de>

# 9404fc85 06-Mar-2016 Simon Glass <sjg@chromium.org>

fdtgrep: Improve error handling with invalid device tree

This tool requires that the aliases node be the first node in the tree. But
when it is not, it does not handle things gracefully. In fact it crashes.

Fix this, and add a more helpful error message.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# f403914d 17-Oct-2015 Simon Glass <sjg@chromium.org>

fdtgrep: Simplify the alias generation code

We don't need to allocate a new region list when we run out of space.
The outer function can take care of this for us.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# 1043d0a0 23-Jun-2015 Simon Glass <sjg@chromium.org>

fdt: Add fdtgrep tool

This tool allows us to extract subsets of a device tree file. It is used by
the SPL vuild, which needs to cut down the device tree size for use in
limited memory.

This tool was originally written for libfdt but it has not been accepted
upstream, so for now, include it in U-Boot. Several utilfdt library
functions been included inline here.

If fdtgrep is eventually accepted in libfdt then we can bring that version
of libfdt in here, and drop fdtgrep (requiring that fdtgrep is provided by
the user).

If it is not accepted then another approach would be to write a special
tool for chopping down device tree files for SPL. While it would use the
same libfdt support, it would be less code than fdtgrep.c because it would
not have general-purpose functions.

Another approach (which was used with v1 of this series) is to sprinkler all
the device tree files with #ifdef. I don't like that idea.

Signed-off-by: Simon Glass <sjg@chromium.org>

# ac549ac8 10-Feb-2021 Samuel Dionne-Riel <samuel@dionne-riel.com>

tools: fdtgrep: Use unsigned chars for arrays

Otherwise, values over 127 end up prefixed with ffffff.

Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>

# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>

# dd0ee9ea 12-Jun-2018 Simon Glass <sjg@chromium.org>

fdtgrep: Separate out checking of two allocations

The current code might succeed on the first allocation and fail on the
second. Separate the checks to avoid this problem.

Of course, free() will never fail and the chances that (when allocating
two small areas) one will succeed and one will fail are just as remote.
But this keeps coverity happy.

Reported-by: Coverity (CID: 131226)

Signed-off-by: Simon Glass <sjg@chromium.org>

# e178db1d 12-Jun-2018 Simon Glass <sjg@chromium.org>

fdtgrep: Fix logic of free() in do_fdtgrep()

This loop never actually exits, but the way the code is written this is
not obvious. Add an explicit error check.

Reported-by: Coverity (CID: 131280)
Signed-off-by: Simon Glass <sjg@chromium.org>
[trini: Add explicit init of region to NULL per LLVM warning]
Signed-off-by: Tom Rini <trini@konsulko.com>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# d2bf1152 21-Jan-2018 Masahiro Yamada <yamada.masahiro@socionext.com>

tools: include necessary headers explicitly

Several host-tools use "bool" type without including <stdbool.h>.
This relies on the crappy header inclusion chain.

tools/Makefile has the following line:

HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \

All host-tools are forced to include libfdt_env.h even if they are
totally unrelated to FDT. Then, <stdbool.h> is indirectly included
as follows:

include/libfdt_env.h
-> include/linux/types.h
-> <stdbool.h>

I am fixing this horrible crap. In advance, I need to add necessary
include directives explicitly. tools/fdtgrep.c needs more; <fctl.h>
for open() and <errno.h> for errno.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# ae9ace70 21-Jan-2018 Masahiro Yamada <yamada.masahiro@socionext.com>

libfdt: migrate fdt_rw.c to a wrapper of scripts/dtc/libfdt/fdt_rw.c

The only difference between scripts/dtc/libfdt/fdt_rw.c and
lib/libfdt/fdt_rw.c is fdt_remove_unused_strings().

It is only used by fdtgrep, so we do not need to compile it for U-Boot
image. Move it to tools/libfdt/fdw_rw.c so that lib/libfdt/fdt_rw.c
can be a wrapper of scripts/dtc/libfdt/fdt_rw.c.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# b95a5190 02-Nov-2017 Jan Kundrát <jan.kundrat@cesnet.cz>

Do not attempt to use the systemwide libfdt

U-Boot bundles a patched copy of libfdt, so it's wrong to attempt to
include it <like/this>. This breaks the build for me when I have dtc
fully installed in my host -- as happened earlier tonight with
Buildroot, for example.

There are several other occurrences throughout the code where '<libfdt'
matches. I'm not modifying these because I have no clue why the
<systemwide> include style is being used -- IMHO wrongly.

Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>

# 96725153 07-Jun-2017 Simon Glass <sjg@chromium.org>

fdtgrep: Deal with NULL data passed to check_type_include()

Since the parameter can be NULL we must be careful not to dereference it
in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Coverity (CID: 163250)
Fixes: 1043d0a0 (fdt: Add fdtgrep tool)

# c47a38b4 02-Apr-2017 Simon Glass <sjg@chromium.org>

fdtgrep: Cope with the /aliases node being last

With skeleton.dtsi being dropped it is more likely that the /aliases node
will be last in the device tree. Update fdtgrep to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# fc0b5948 07-Sep-2016 Robert P. J. Day <rpjday@crashcourse.ca>

Various, accumulated typos collected from around the tree.

Fix various misspellings of:

* deprecated
* partition
* preceding,preceded
* preparation
* its versus it's
* export
* existing
* scenario
* redundant
* remaining
* value
* architecture

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Stefan Roese <sr@denx.de>

# 9404fc85 06-Mar-2016 Simon Glass <sjg@chromium.org>

fdtgrep: Improve error handling with invalid device tree

This tool requires that the aliases node be the first node in the tree. But
when it is not, it does not handle things gracefully. In fact it crashes.

Fix this, and add a more helpful error message.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# f403914d 17-Oct-2015 Simon Glass <sjg@chromium.org>

fdtgrep: Simplify the alias generation code

We don't need to allocate a new region list when we run out of space.
The outer function can take care of this for us.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>

# 1043d0a0 23-Jun-2015 Simon Glass <sjg@chromium.org>

fdt: Add fdtgrep tool

This tool allows us to extract subsets of a device tree file. It is used by
the SPL vuild, which needs to cut down the device tree size for use in
limited memory.

This tool was originally written for libfdt but it has not been accepted
upstream, so for now, include it in U-Boot. Several utilfdt library
functions been included inline here.

If fdtgrep is eventually accepted in libfdt then we can bring that version
of libfdt in here, and drop fdtgrep (requiring that fdtgrep is provided by
the user).

If it is not accepted then another approach would be to write a special
tool for chopping down device tree files for SPL. While it would use the
same libfdt support, it would be less code than fdtgrep.c because it would
not have general-purpose functions.

Another approach (which was used with v1 of this series) is to sprinkler all
the device tree files with #ifdef. I don't like that idea.

Signed-off-by: Simon Glass <sjg@chromium.org>

# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@foss.st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# b606a6cf 09-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# 64045a6a 16-Apr-2020 Masahiro Yamada <masahiroy@kernel.org>

libfdt: split fdt_region declarations out to <fdt_region.h>

fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of <fdt_region.h>. This allows <linux/libfdt.h> to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dae188e6 13-Jan-2020 Patrick Delaunay <patrick.delaunay@st.com>

tools: ftdgrep: correct the find regions loop in do_fdtgrep

Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count > max_region after the second pass.

This patch solve an issue if the number of region found (count)
is greater then the default value (max_region = count = 100):
the second pass is never executed, because the loop stops after
the first pass (i = 0, count > 100, max_regions = 100)
with error -1 and the error message
"Internal error with fdtgrep_find_region".

I also update the error message.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>


# dd0ee9ea 12-Jun-2018 Simon Glass <sjg@chromium.org>

fdtgrep: Separate out checking of two allocations

The current code might succeed on the first allocation and fail on the
second. Separate the checks to avoid this problem.

Of course, free() will never fail and the chances that (when allocating
two small areas) one will succeed and one will fail are just as remote.
But this keeps coverity happy.

Reported-by: Coverity (CID: 131226)

Signed-off-by: Simon Glass <sjg@chromium.org>


# e178db1d 12-Jun-2018 Simon Glass <sjg@chromium.org>

fdtgrep: Fix logic of free() in do_fdtgrep()

This loop never actually exits, but the way the code is written this is
not obvious. Add an explicit error check.

Reported-by: Coverity (CID: 131280)
Signed-off-by: Simon Glass <sjg@chromium.org>
[trini: Add explicit init of region to NULL per LLVM warning]
Signed-off-by: Tom Rini <trini@konsulko.com>


# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>


# d2bf1152 21-Jan-2018 Masahiro Yamada <yamada.masahiro@socionext.com>

tools: include necessary headers explicitly

Several host-tools use "bool" type without including <stdbool.h>.
This relies on the crappy header inclusion chain.

tools/Makefile has the following line:

HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \

All host-tools are forced to include libfdt_env.h even if they are
totally unrelated to FDT. Then, <stdbool.h> is indirectly included
as follows:

include/libfdt_env.h
-> include/linux/types.h
-> <stdbool.h>

I am fixing this horrible crap. In advance, I need to add necessary
include directives explicitly. tools/fdtgrep.c needs more; <fctl.h>
for open() and <errno.h> for errno.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# ae9ace70 21-Jan-2018 Masahiro Yamada <yamada.masahiro@socionext.com>

libfdt: migrate fdt_rw.c to a wrapper of scripts/dtc/libfdt/fdt_rw.c

The only difference between scripts/dtc/libfdt/fdt_rw.c and
lib/libfdt/fdt_rw.c is fdt_remove_unused_strings().

It is only used by fdtgrep, so we do not need to compile it for U-Boot
image. Move it to tools/libfdt/fdw_rw.c so that lib/libfdt/fdt_rw.c
can be a wrapper of scripts/dtc/libfdt/fdt_rw.c.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b95a5190 02-Nov-2017 Jan Kundrát <jan.kundrat@cesnet.cz>

Do not attempt to use the systemwide libfdt

U-Boot bundles a patched copy of libfdt, so it's wrong to attempt to
include it <like/this>. This breaks the build for me when I have dtc
fully installed in my host -- as happened earlier tonight with
Buildroot, for example.

There are several other occurrences throughout the code where '<libfdt'
matches. I'm not modifying these because I have no clue why the
<systemwide> include style is being used -- IMHO wrongly.

Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>


# 96725153 07-Jun-2017 Simon Glass <sjg@chromium.org>

fdtgrep: Deal with NULL data passed to check_type_include()

Since the parameter can be NULL we must be careful not to dereference it
in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Coverity (CID: 163250)
Fixes: 1043d0a0 (fdt: Add fdtgrep tool)


# c47a38b4 02-Apr-2017 Simon Glass <sjg@chromium.org>

fdtgrep: Cope with the /aliases node being last

With skeleton.dtsi being dropped it is more likely that the /aliases node
will be last in the device tree. Update fdtgrep to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# fc0b5948 07-Sep-2016 Robert P. J. Day <rpjday@crashcourse.ca>

Various, accumulated typos collected from around the tree.

Fix various misspellings of:

* deprecated
* partition
* preceding,preceded
* preparation
* its versus it's
* export
* existing
* scenario
* redundant
* remaining
* value
* architecture

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Stefan Roese <sr@denx.de>


# 9404fc85 06-Mar-2016 Simon Glass <sjg@chromium.org>

fdtgrep: Improve error handling with invalid device tree

This tool requires that the aliases node be the first node in the tree. But
when it is not, it does not handle things gracefully. In fact it crashes.

Fix this, and add a more helpful error message.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# f403914d 17-Oct-2015 Simon Glass <sjg@chromium.org>

fdtgrep: Simplify the alias generation code

We don't need to allocate a new region list when we run out of space.
The outer function can take care of this for us.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>


# 1043d0a0 23-Jun-2015 Simon Glass <sjg@chromium.org>

fdt: Add fdtgrep tool

This tool allows us to extract subsets of a device tree file. It is used by
the SPL vuild, which needs to cut down the device tree size for use in
limited memory.

This tool was originally written for libfdt but it has not been accepted
upstream, so for now, include it in U-Boot. Several utilfdt library
functions been included inline here.

If fdtgrep is eventually accepted in libfdt then we can bring that version
of libfdt in here, and drop fdtgrep (requiring that fdtgrep is provided by
the user).

If it is not accepted then another approach would be to write a special
tool for chopping down device tree files for SPL. While it would use the
same libfdt support, it would be less code than fdtgrep.c because it would
not have general-purpose functions.

Another approach (which was used with v1 of this series) is to sprinkler all
the device tree files with #ifdef. I don't like that idea.

Signed-off-by: Simon Glass <sjg@chromium.org>