]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
global_data.h: drop write-only field dm_root_f
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Mon, 27 May 2024 20:04:17 +0000 (22:04 +0200)
committerSimon Glass <sjg@chromium.org>
Wed, 3 Jul 2024 06:36:33 +0000 (07:36 +0100)
The dm_root_f field seems to be entirely write-only and hence
redundant, unless 'git grep' fails to find some access generated via
preprocessor token concatenation or similar.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/board_r.c
include/asm-generic/global_data.h
test/dm/core.c

index c823cd262f16e0d7b038bea3b1f120beb2a1d56e..d4ba245ac691448bc7968090494abeba5d2c78cb 100644 (file)
@@ -230,8 +230,7 @@ static int initr_dm(void)
 
        oftree_reset();
 
-       /* Save the pre-reloc driver model and start a new one */
-       gd->dm_root_f = gd->dm_root;
+       /* Drop the pre-reloc driver model and start a new one */
        gd->dm_root = NULL;
 #ifdef CONFIG_TIMER
        gd->timer = NULL;
index fcc3c6e14ca3db6ed3a0401986e0c9eb4c5cb82e..aa336d63e3af39e5b79bdd0e0abfa0f9d5e8a954 100644 (file)
@@ -195,10 +195,6 @@ struct global_data {
         * @dm_root: root instance for Driver Model
         */
        struct udevice *dm_root;
-       /**
-        * @dm_root_f: pre-relocation root instance
-        */
-       struct udevice *dm_root_f;
        /**
         * @uclass_root_s:
         * head of core tree when uclasses are not in read-only memory.
index 4741c81bcc1d6ae392c1bed14ba5713ba0ea5f0d..dbad1b317db7912db74e0c86fa9d32a215d987ee 100644 (file)
@@ -1006,7 +1006,6 @@ static int dm_test_uclass_before_ready(struct unit_test_state *uts)
        ut_assertok(uclass_get(UCLASS_TEST, &uc));
 
        gd->dm_root = NULL;
-       gd->dm_root_f = NULL;
        memset(&gd->uclass_root, '\0', sizeof(gd->uclass_root));
 
        ut_asserteq_ptr(NULL, uclass_find(UCLASS_TEST));