From: Marek Vasut Date: Tue, 26 Mar 2024 22:13:14 +0000 (+0100) Subject: boot: fdt: Clean up env_get_bootm_mapsize() X-Git-Url: http://git.dujemihanovic.xyz/html/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=ca8d4dfdbdc092f0d5b064a10dcd33567a0737ef;p=u-boot.git boot: fdt: Clean up env_get_bootm_mapsize() 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 --- diff --git a/boot/image-board.c b/boot/image-board.c index 13876b7902..09b6e4e0bd 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;