From: Zijun Hu Date: Fri, 6 Dec 2024 00:52:32 +0000 (+0800) Subject: of/fdt: Dump __be32 array in CPU type order in of_dump_addr() X-Git-Tag: v6.14-rc1~100^2~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ff899ee4ef0876555dabe532d3179ec90502291;p=thirdparty%2Flinux.git of/fdt: Dump __be32 array in CPU type order in of_dump_addr() of_dump_addr() dumps __be32 array without conversion to CPU byte order in advance, that will reduce log readability for little endian CPUs. Fix by be32_to_cpu() conversion before dump. Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/20241206-of_core_fix-v1-6-dc28ed56bec3@quicinc.com Signed-off-by: Rob Herring (Arm) --- diff --git a/drivers/of/fdt_address.c b/drivers/of/fdt_address.c index 9804d7f067056..1e5311f6f1858 100644 --- a/drivers/of/fdt_address.c +++ b/drivers/of/fdt_address.c @@ -28,7 +28,7 @@ static void __init of_dump_addr(const char *s, const __be32 *addr, int na) { pr_debug("%s", s); while(na--) - pr_cont(" %08x", *(addr++)); + pr_cont(" %08x", be32_to_cpu(*(addr++))); pr_cont("\n"); } #else