[PATCH v3 3/5] boot: fdt: Clean up env_get_bootm_mapsize()

Marek Vasut marek.vasut+renesas at mailbox.org
Wed Mar 20 21:53:07 CET 2024


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 at mailbox.org>
---
Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
Cc: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Tom Rini <trini at konsulko.com>
---
V3: - New patch
---
 boot/image-board.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/boot/image-board.c b/boot/image-board.c
index e3d63745299..b036ed764f8 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;
-- 
2.43.0



More information about the U-Boot mailing list