Message ID | 1470455849-30860-1-git-send-email-sjg@chromium.org |
---|---|
State | Accepted |
Commit | ddd917b8fa32c3ef5e2609282d7e5d8f299f1872 |
Delegated to: | Bin Meng |
Headers | show |
On Fri, Aug 05, 2016 at 09:57:27PM -0600, Simon Glass wrote: > 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 <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
On Sat, Aug 6, 2016 at 11:57 AM, Simon Glass <sjg@chromium.org> wrote: > 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 <sjg@chromium.org> > --- > > cmd/bdinfo.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
On Sun, Aug 7, 2016 at 2:41 PM, Bin Meng <bmeng.cn@gmail.com> wrote: > On Sat, Aug 6, 2016 at 11:57 AM, Simon Glass <sjg@chromium.org> wrote: >> 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 <sjg@chromium.org> >> --- >> >> cmd/bdinfo.c | 8 +++++--- >> 1 file changed, 5 insertions(+), 3 deletions(-) >> > > Reviewed-by: Bin Meng <bmeng.cn@gmail.com> applied to u-boot-x86, thanks!
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index 637463e..696c67a 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 }
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 <sjg@chromium.org> --- cmd/bdinfo.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)