]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
boot: fdt: Move usable variable below updated comment
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Tue, 26 Mar 2024 22:13:16 +0000 (23:13 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 11 Apr 2024 15:38:57 +0000 (09:38 -0600)
Move the variable below comment which explains what the variable means.
Update the comment. No functional change.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
boot/image-fdt.c

index c37442c913027255f570cacd6407def1cb733297..2b92bdaff169d991b3b766f40ed8678398012651 100644 (file)
@@ -218,12 +218,12 @@ int boot_relocate_fdt(struct lmb *lmb, char **of_flat_tree, ulong *of_size)
                        if (start + size < low)
                                continue;
 
-                       usable = min(start + size, low + mapsize);
-
                        /*
                         * At least part of this DRAM bank is usable, try
-                        * using it for LMB allocation.
+                        * using the DRAM bank up to 'usable' address limit
+                        * for LMB allocation.
                         */
+                       usable = min(start + size, low + mapsize);
                        addr = lmb_alloc_base(lmb, of_len, 0x1000, usable);
                        of_start = map_sysmem(addr, of_len);
                        /* Allocation succeeded, use this block. */