Skip to content
Commit 49975899 authored by Eugeniu Rosca's avatar Eugeniu Rosca Committed by Tom Rini
Browse files

image.h: use uint32_t instead of u32 in android_image_get_dtb*

Replace 'u32' by 'uint32_t' in image.h, since the former may lead to
build failures in U-Boot tooling (see [1]).

Avoid using 'uint', since it is not a fixed-width type [2], potentially
leading to a dangerous mismatch between the prototypes and definitions
of the android_image_get_dtb* functions.

This should be the quickest way to overcome the tooling build failure,
with more future-proof solutions being proposed by Yamada-san in [1].

[1] https://patchwork.ozlabs.org/patch/1238245/
[2] Excerpt from https://en.cppreference.com/w/cpp/language/types


 -----------8<------------
 Type specifier    Width in bits by data model
                   LP32  ILP32  LLP64  LP64
 unsigned int      16    32     32     32
 -----------8<------------

Cc: Tom Rini <trini@konsulko.com>
Cc: Sam Protsenko <joe.skb7@gmail.com>
Fixes: 7f253150 ("image: android: Add routine to get dtbo params")
Fixes: c3bfad82 ("image: android: Add functions for handling dtb field")
Suggested-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Signed-off-by: default avatarEugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Reviewed-by: default avatarSam Protsenko <joe.skb7@gmail.com>
parent 601af58b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment