Message ID | 20240326221431.55346-2-marek.vasut+renesas@mailbox.org |
---|---|
State | Accepted |
Commit | 98e68ec18f17fb1b81d4ffc1cbcd10569ba71309 |
Delegated to: | Tom Rini |
Headers | show |
Series | [v4,1/6] boot: fdt: Change type of env_get_bootm_low() to phys_addr_t | expand |
diff --git a/boot/image-board.c b/boot/image-board.c index 3263497a1d5..e3d63745299 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;
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> --- 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> --- V2: - New patch V3: - Reword commit message V4: No change --- boot/image-board.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)