[PATCH 7/7] bdinfo: Change to use bdinfo_print_num_ll() where the number could be 64-bit

Bin Meng bmeng.cn at gmail.com
Thu Jan 21 16:00:15 CET 2021


From: Bin Meng <bin.meng at windriver.com>

There are some calls to bdinfo_print_num_l() with parameters that
could be a 64-bit value on a 32-bit system. Change those calls to
use bdinfo_print_num_ll() instead.

Signed-off-by: Bin Meng <bin.meng at windriver.com>
---

 arch/arm/lib/bdinfo.c | 8 ++++----
 cmd/bdinfo.c          | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/lib/bdinfo.c b/arch/arm/lib/bdinfo.c
index 4a98cb7ef5..c905783bdc 100644
--- a/arch/arm/lib/bdinfo.c
+++ b/arch/arm/lib/bdinfo.c
@@ -18,14 +18,14 @@ void arch_print_bdinfo(void)
 	bdinfo_print_num_l("arch_number", bd->bi_arch_number);
 #ifdef CONFIG_SYS_MEM_RESERVE_SECURE
 	if (gd->arch.secure_ram & MEM_RESERVE_SECURE_SECURED) {
-		bdinfo_print_num_l("Secure ram",
-				   gd->arch.secure_ram &
-				   MEM_RESERVE_SECURE_ADDR_MASK);
+		bdinfo_print_num_ll("Secure ram",
+				    gd->arch.secure_ram &
+				    MEM_RESERVE_SECURE_ADDR_MASK);
 	}
 #endif
 #ifdef CONFIG_RESV_RAM
 	if (gd->arch.resv_ram)
-		bdinfo_print_num_l("Reserved ram", gd->arch.resv_ram);
+		bdinfo_print_num_ll("Reserved ram", gd->arch.resv_ram);
 #endif
 #if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
 	bdinfo_print_num_l("TLB addr", gd->arch.tlb_addr);
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index 996546faf3..dfd50ae849 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -55,8 +55,8 @@ static void print_bi_dram(const struct bd_info *bd)
 	for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) {
 		if (bd->bi_dram[i].size) {
 			bdinfo_print_num_l("DRAM bank",	i);
-			bdinfo_print_num_l("-> start",	bd->bi_dram[i].start);
-			bdinfo_print_num_l("-> size",	bd->bi_dram[i].size);
+			bdinfo_print_num_ll("-> start",	bd->bi_dram[i].start);
+			bdinfo_print_num_ll("-> size",	bd->bi_dram[i].size);
 		}
 	}
 }
-- 
2.25.1



More information about the U-Boot mailing list