Skip to content
Commit 8c9eaada authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Simon Glass
Browse files

dm: ofnode: use fdt32_t for DT property value to fix sparse warning



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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent fce136aa
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