From: Jaehoon Chung Date: Tue, 5 Nov 2024 09:39:20 +0000 (+0900) Subject: boot: image-board: Mismatch a type between variable and return value X-Git-Tag: accepted/tizen/unified/20241126.175211~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F43%2F319943%2F1;p=platform%2Fkernel%2Fu-boot.git boot: image-board: Mismatch a type between variable and return value phys_addr_t can be used unsigned long long type with CONFIG_PHYS_64BIT. But hextoul() is always returning to unsigned long. It can be assigned to unexpected value. To avoid wrong behavior, change from hextoul() to simple_strtoull(). Fixes: a4df06e41fa2 ("boot: fdt: Change type of env_get_bootm_low() to phys_addr_t") Change-Id: Ia7c25f8fbc8e31bdd7abd1f9cf599c4c873dd769 Signed-off-by: Jaehoon Chung --- diff --git a/boot/image-board.c b/boot/image-board.c index eca1b1d2bf..62f0f609f5 100644 --- a/boot/image-board.c +++ b/boot/image-board.c @@ -548,7 +548,7 @@ int boot_ramdisk_high(struct lmb *lmb, ulong rd_data, ulong rd_len, /* a value of "no" or a similar string will act like 0, * turning the "load high" feature off. This is intentional. */ - initrd_high = hextoul(s, NULL); + initrd_high = simple_strtoull(s, NULL, 16); if (initrd_high == ~0) initrd_copy_to_ram = 0; } else {