summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Kotheimer <[email protected]>2019-07-24 11:38:14 +0200
committerAnup Patel <[email protected]>2019-07-25 08:59:50 +0530
commitbf2ee7bcdc9b94aa4c62f197adeb71bab20bcfa3 (patch)
tree0187e8715c6af1923d85164ea9d3e7f84c546701
parente3f743339ab3d103aa5399a7bbb357f8cc618862 (diff)
utils: Use cpu_to_fdt32() when writing to fdt
Although it does not make a functional difference, both cpu_to_fdt32() and fdt32_to_cpu() pass on to CPU_TO_FDT32, we should use cpu_to_fdt32() to be semantically correct. Signed-off-by: Georg Kotheimer <[email protected]> Reviewed-by: Atish Patra <[email protected]> Acked-by: Anup Patel <[email protected]>
-rw-r--r--lib/utils/irqchip/plic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils/irqchip/plic.c b/lib/utils/irqchip/plic.c
index 2cd055e6..5dcbce05 100644
--- a/lib/utils/irqchip/plic.c
+++ b/lib/utils/irqchip/plic.c
@@ -68,7 +68,7 @@ void plic_fdt_fixup(void *fdt, const char *compat)
for (i = 0; i < (cells_count / 2); i++) {
if (fdt32_to_cpu(cells[2 * i + 1]) == IRQ_M_EXT)
- cells[2 * i + 1] = fdt32_to_cpu(0xffffffff);
+ cells[2 * i + 1] = cpu_to_fdt32(0xffffffff);
}
}