]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
boot: fdt: Clean up env_get_bootm_size()
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Tue, 26 Mar 2024 22:13:12 +0000 (23:13 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 11 Apr 2024 15:38:57 +0000 (09:38 -0600)
Reduce tmp variable use and remove unnecessary type cast in
env_get_bootm_size(). This aligns the env variable parsing
with env_get_bootm_low(). No functional change.

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

index 3263497a1d5ff18423e6f090d0b2dbae7695bb44..e3d63745299393b7d228a85a94190c8db53f5700 100644 (file)
@@ -129,10 +129,8 @@ phys_size_t env_get_bootm_size(void)
        phys_addr_t start;
        char *s = env_get("bootm_size");
 
-       if (s) {
-               tmp = (phys_size_t)simple_strtoull(s, NULL, 16);
-               return tmp;
-       }
+       if (s)
+               return simple_strtoull(s, NULL, 16);
 
        start = gd->ram_base;
        size = gd->ram_size;
@@ -142,7 +140,7 @@ phys_size_t env_get_bootm_size(void)
 
        s = env_get("bootm_low");
        if (s)
-               tmp = (phys_size_t)simple_strtoull(s, NULL, 16);
+               tmp = simple_strtoull(s, NULL, 16);
        else
                tmp = start;