diff options
author | Zijun Hu <quic_zijuhu@quicinc.com> | 2024-12-06 08:52:32 +0800 |
---|---|---|
committer | Rob Herring (Arm) <robh@kernel.org> | 2024-12-10 10:50:26 -0600 |
commit | 4ff899ee4ef0876555dabe532d3179ec90502291 (patch) | |
tree | c416d8837ec55804eeee4789ef910457adbb682d /drivers/of | |
parent | 3c48780d48df029cf9d5f42b8971663e6fb975ae (diff) |
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 <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20241206-of_core_fix-v1-6-dc28ed56bec3@quicinc.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/fdt_address.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/fdt_address.c b/drivers/of/fdt_address.c index 9804d7f06705..1e5311f6f185 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 |