From: Wolfgang Denk Date: Tue, 06 May 2008 21:28:25 +0200 Subject: [U-Boot-Users] [PATCH 13/21] Remeber the RAM and NAND detected sizes for later display In-Reply-To: Your message of "Tue, 06 May 2008 17:33:35 +0200." <1210088022-25757-14-git-send-email-stelian@popies.net> Message-ID: <20080506192825.774FD247F5@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <1210088022-25757-14-git-send-email-stelian@popies.net> you wrote: > > Signed-off-by: Stelian Pop > --- > include/asm-arm/u-boot.h | 4 ++++ > lib_arm/board.c | 14 ++++++++------ > 2 files changed, 12 insertions(+), 6 deletions(-) > > diff --git a/include/asm-arm/u-boot.h b/include/asm-arm/u-boot.h > index c120312..dbfe2cf 100644 > --- a/include/asm-arm/u-boot.h > +++ b/include/asm-arm/u-boot.h > @@ -48,10 +48,14 @@ typedef struct bd_info { > ulong start; > ulong size; > } bi_dram[CONFIG_NR_DRAM_BANKS]; > + ulong bi_dram_size; Why would that be needed? Isn't adding the "size" entries above sufficient? > for (i=0; i - size += gd->bd->bi_dram[i].size; > + gd->bd->bi_dram_size += gd->bd->bi_dram[i].size; > } > puts("DRAM: "); > - print_size(size, "\n"); > + print_size(gd->bd->bi_dram_size, "\n"); We really don't need an extra variable here, me thinks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de You can't evaluate a man by logic alone. -- McCoy, "I, Mudd", stardate 4513.3