]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
boot: fdt: Fix tmp type in env_get_bootm_size() and rename to low
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Tue, 26 Mar 2024 22:13:13 +0000 (23:13 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 11 Apr 2024 15:38:57 +0000 (09:38 -0600)
Change type of 'tmp' variable from phys_size_t to phys_addr_t and
rename it to 'low' to better describe what the variable represents,
which is either the bootm_low address from environment or start of
DRAM address.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
boot/image-board.c

index e3d63745299393b7d228a85a94190c8db53f5700..13876b790262519890fe53db2fdc34248759d299 100644 (file)
@@ -125,8 +125,8 @@ phys_addr_t env_get_bootm_low(void)
 
 phys_size_t env_get_bootm_size(void)
 {
-       phys_size_t tmp, size;
-       phys_addr_t start;
+       phys_addr_t start, low;
+       phys_size_t size;
        char *s = env_get("bootm_size");
 
        if (s)
@@ -140,11 +140,11 @@ phys_size_t env_get_bootm_size(void)
 
        s = env_get("bootm_low");
        if (s)
-               tmp = simple_strtoull(s, NULL, 16);
+               low = simple_strtoull(s, NULL, 16);
        else
-               tmp = start;
+               low = start;
 
-       return size - (tmp - start);
+       return size - (low - start);
 }
 
 phys_size_t env_get_bootm_mapsize(void)