
6 Jul
2017
6 Jul
'17
7:36 p.m.
On 22 June 2017 at 02:57, Masahiro Yamada yamada.masahiro@socionext.com wrote:
DTB is encoded in big endian. When we retrieve property values, we need to use fdt32_to_cpu (aka be32_to_cpu) for endian conversion. This is a bit error-prone, but sparse is useful to detect endian mismatch.
We need to use (fdt32_t *) instead of (u32 *) for a pointer of a property value. Otherwise sparse warns "cast to restricted __be32".
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com
drivers/core/ofnode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot-dm, thanks!