<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/tools/fdtgrep.c, branch v2023.07.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/tools/fdtgrep.c?h=v2023.07.01</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/tools/fdtgrep.c?h=v2023.07.01'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2022-12-08T14:29:02Z</updated>
<entry>
<title>tools: fdtgrep: Fix handle leak</title>
<updated>2022-12-08T14:29:02Z</updated>
<author>
<name>Mikhail Ilin</name>
<email>ilin.mikhail.ol@gmail.com</email>
</author>
<published>2022-11-23T11:31:03Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4b95e8407eba6e6fd73341695de15dec19e723a8'/>
<id>urn:sha1:4b95e8407eba6e6fd73341695de15dec19e723a8</id>
<content type='text'>
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 &lt;ilin.mikhail.ol@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>fdtgrep: Correct alignment of struct section</title>
<updated>2021-12-17T16:44:59Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-12-08T16:55:34Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=70ab7b1799112398047be63cc113f93955f0f352'/>
<id>urn:sha1:70ab7b1799112398047be63cc113f93955f0f352</id>
<content type='text'>
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 &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>tools: fdtgrep: Use unsigned chars for arrays</title>
<updated>2021-03-22T06:23:26Z</updated>
<author>
<name>Samuel Dionne-Riel</name>
<email>samuel@dionne-riel.com</email>
</author>
<published>2021-02-11T00:43:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ac549ac82d1b09fa9b912f64784426dec9052c20'/>
<id>urn:sha1:ac549ac82d1b09fa9b912f64784426dec9052c20</id>
<content type='text'>
Otherwise, values over 127 end up prefixed with ffffff.

Signed-off-by: Samuel Dionne-Riel &lt;samuel@dionne-riel.com&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>tools: ftdgrep: use /* fallthrough */ as needed</title>
<updated>2020-05-15T18:47:35Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2020-05-09T15:12:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b606a6cfa6d3d606f4cdbd1585f74cec409af661'/>
<id>urn:sha1:b606a6cfa6d3d606f4cdbd1585f74cec409af661</id>
<content type='text'>
GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>libfdt: split fdt_region declarations out to &lt;fdt_region.h&gt;</title>
<updated>2020-04-26T20:24:08Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2020-04-16T09:30:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=64045a6a173e6cf74a9c30bbe21a93d105be289e'/>
<id>urn:sha1:64045a6a173e6cf74a9c30bbe21a93d105be289e</id>
<content type='text'>
fdt_region APIs are not part of libfdt. They are U-Boot extension
for the verified boot. Split the declarations related to fdt_region
out of &lt;fdt_region.h&gt;. This allows &lt;linux/libfdt.h&gt; to become a
simple wrapper file, like Linux does.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools: ftdgrep: correct the find regions loop in do_fdtgrep</title>
<updated>2020-01-24T17:33:08Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@st.com</email>
</author>
<published>2020-01-13T08:33:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=dae188e6839aa678f1ab4518d92b7eda7277fedf'/>
<id>urn:sha1:dae188e6839aa678f1ab4518d92b7eda7277fedf</id>
<content type='text'>
Use realloc and update the loop executed in do_fdtgrep to find all
the regions: only test count &gt; max_region after the second pass.

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

I also update the error message.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@st.com&gt;
</content>
</entry>
<entry>
<title>fdtgrep: Separate out checking of two allocations</title>
<updated>2018-06-19T11:31:44Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2018-06-12T06:04:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=dd0ee9ea857c4e4d927ae41791c1626fd57c301d'/>
<id>urn:sha1:dd0ee9ea857c4e4d927ae41791c1626fd57c301d</id>
<content type='text'>
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 &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>fdtgrep: Fix logic of free() in do_fdtgrep()</title>
<updated>2018-06-19T11:31:43Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2018-06-12T06:04:58Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e178db1d7736a92951fdc7f1fd9b8ecf4d2877ba'/>
<id>urn:sha1:e178db1d7736a92951fdc7f1fd9b8ecf4d2877ba</id>
<content type='text'>
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 &lt;sjg@chromium.org&gt;
[trini: Add explicit init of region to NULL per LLVM warning]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>SPDX: Convert all of our single license tags to Linux Kernel style</title>
<updated>2018-05-07T13:34:12Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2018-05-06T21:58:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=83d290c56fab2d38cd1ab4c4cc7099559c1d5046'/>
<id>urn:sha1:83d290c56fab2d38cd1ab4c4cc7099559c1d5046</id>
<content type='text'>
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 &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>tools: include necessary headers explicitly</title>
<updated>2018-01-28T17:27:31Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2018-01-21T10:19:15Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d2bf1152c078e7db7ffade193da8cfb1b8430ce0'/>
<id>urn:sha1:d2bf1152c078e7db7ffade193da8cfb1b8430ce0</id>
<content type='text'>
Several host-tools use "bool" type without including &lt;stdbool.h&gt;.
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, &lt;stdbool.h&gt; is indirectly included
as follows:

     include/libfdt_env.h
  -&gt; include/linux/types.h
  -&gt; &lt;stdbool.h&gt;

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

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Reviewed-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
</feed>
