Searched hist:"8 c9eaadaaad888e0cd77512553d0d02d476b4dde" (Results 1 – 1 of 1) sorted by relevance
| /rk3399_rockchip-uboot/drivers/core/ |
| H A D | ofnode.c | 8c9eaadaaad888e0cd77512553d0d02d476b4dde Thu Jun 22 08:57:50 UTC 2017 Masahiro Yamada <yamada.masahiro@socionext.com> 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: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|