aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@mailbox.org>2024-03-26 23:13:12 +0100
committerTom Rini <trini@konsulko.com>2024-04-11 09:38:57 -0600
commit98e68ec18f17fb1b81d4ffc1cbcd10569ba71309 (patch)
tree8534ce9e48589974709b2ad35dd7f435398aaeec
parenta4df06e41fa29ebc2b31b15ae229b2273af69fa6 (diff)
downloadu-boot-98e68ec18f17fb1b81d4ffc1cbcd10569ba71309.zip
u-boot-98e68ec18f17fb1b81d4ffc1cbcd10569ba71309.tar.gz
u-boot-98e68ec18f17fb1b81d4ffc1cbcd10569ba71309.tar.bz2
boot: fdt: Clean up env_get_bootm_size()
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>
-rw-r--r--boot/image-board.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/boot/image-board.c b/boot/image-board.c
index 3263497..e3d6374 100644
--- a/boot/image-board.c
+++ b/boot/image-board.c
@@ -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;