diff mbox series

[v4,4/6] boot: fdt: Clean up env_get_bootm_mapsize()

Message ID 20240326221431.55346-4-marek.vasut+renesas@mailbox.org
State Accepted
Commit ca8d4dfdbdc092f0d5b064a10dcd33567a0737ef
Delegated to: Tom Rini
Headers show
Series [v4,1/6] boot: fdt: Change type of env_get_bootm_low() to phys_addr_t | expand

Commit Message

Marek Vasut March 26, 2024, 10:13 p.m. UTC
Reduce tmp variable use and remove unnecessary type cast in
env_get_bootm_mapsize(). This aligns the env variable parsing
with env_get_bootm_low(). No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
---
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
---
V3: - New patch
V4: No change
---
 boot/image-board.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/boot/image-board.c b/boot/image-board.c
index 13876b79026..09b6e4e0bdc 100644
--- a/boot/image-board.c
+++ b/boot/image-board.c
@@ -149,13 +149,10 @@  phys_size_t env_get_bootm_size(void)
 
 phys_size_t env_get_bootm_mapsize(void)
 {
-	phys_size_t tmp;
 	char *s = env_get("bootm_mapsize");
 
-	if (s) {
-		tmp = (phys_size_t)simple_strtoull(s, NULL, 16);
-		return tmp;
-	}
+	if (s)
+		return simple_strtoull(s, NULL, 16);
 
 #if defined(CFG_SYS_BOOTMAPSZ)
 	return CFG_SYS_BOOTMAPSZ;