From 0a11485772442457c2c8ec369bb9563a960e0779 Mon Sep 17 00:00:00 2001 From: "Mauro (mdrjr) Ribeiro" Date: Thu, 24 Nov 2022 13:08:56 -0300 Subject: [PATCH] of/fdt: fixes merge error Change-Id: I3d07b0e89d85f6b4f325173a4cfb44f78eb312cc --- drivers/of/fdt.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 4cf3611ade68..84c54ec3042d 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -1100,10 +1100,12 @@ static const char *config_cmdline = ""; int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, int depth, void *data) { - int l = 0; - const char *p = NULL; + int l; + const char *p; + const void *rng_seed; char *cmdline = data; + pr_debug("search \"chosen\", depth: %d, uname: %s\n", depth, uname); if (depth != 1 || !cmdline || @@ -1143,10 +1145,6 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, /* try to clear seed so it won't be found. */ fdt_nop_property(initial_boot_params, node, "rng-seed"); - - /* update CRC check value */ - of_fdt_crc32 = crc32_be(~0, initial_boot_params, - fdt_totalsize(initial_boot_params)); } /* break now */ @@ -1250,8 +1248,6 @@ bool __init early_init_dt_verify(void *params) /* Setup flat device-tree pointer */ initial_boot_params = params; - of_fdt_crc32 = crc32_be(~0, initial_boot_params, - fdt_totalsize(initial_boot_params)); return true; } @@ -1277,6 +1273,8 @@ bool __init early_init_dt_scan(void *params) return false; early_init_dt_scan_nodes(); + of_fdt_crc32 = crc32_be(~0, initial_boot_params, + fdt_totalsize(initial_boot_params)); return true; }