From: Simon Glass Date: Sat, 6 Aug 2016 03:57:27 +0000 (-0600) Subject: bdinfo: Don't print out empty DRAM banks X-Git-Tag: v2016.09-rc2~31^2~6 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ddd917b8fa32c3ef5e2609282d7e5d8f299f1872;p=oweals%2Fu-boot.git bdinfo: Don't print out empty DRAM banks There is no sense in printing out DRAM banks of size 0 since this means they are empty. Skip them. Signed-off-by: Simon Glass Reviewed-by: Tom Rini Reviewed-by: Bin Meng --- diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index e0bd15d54b..30bc15862d 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -98,9 +98,11 @@ static inline void print_bi_dram(const bd_t *bd) int i; for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) { - print_num("DRAM bank", i); - print_num("-> start", bd->bi_dram[i].start); - print_num("-> size", bd->bi_dram[i].size); + if (bd->bi_dram[i].size) { + print_num("DRAM bank", i); + print_num("-> start", bd->bi_dram[i].start); + print_num("-> size", bd->bi_dram[i].size); + } } #endif }