[PATCH] tools: fdtgrep: Use unsigned chars for arrays
Simon Glass
sjg at chromium.org
Tue Mar 16 06:58:25 CET 2021
On Wed, 10 Feb 2021 at 17:43, Samuel Dionne-Riel <samuel at dionne-riel.com> wrote:
>
> Otherwise, values over 127 end up prefixed with ffffff.
>
> Signed-off-by: Samuel Dionne-Riel <samuel at dionne-riel.com>
> Cc: Simon Glass <sjg at chromium.org>
> ---
>
> Minimal reproduction:
>
> ```
> // repro.dts
> /dts-v1/;
>
> / {
> ra = [ 7f ];
> rb = [ 80 ];
> };
> ```
>
> Steps used to compile:
>
> $ dtc repro.dts > repro.dtb
>
> Without the fix:
>
> $ fdtgrep --include-node / repro.dtb
> / {
> ra = [7f];
> rb = [ffffff80];
> };
>
> With the fix:
>
> $ fdtgrep --include-node / repro.dtb
> / {
> ra = [7f];
> rb = [80];
> };
>
> ---
>
> tools/fdtgrep.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
Applied to u-boot-dm/next, thanks!
More information about the U-Boot
mailing list