From patchwork Tue Oct 19 13:18:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gray Remlin X-Patchwork-Id: 71885 Return-Path: X-Original-To: wd@gemini.denx.de Delivered-To: wd@gemini.denx.de Received: from diddl.denx.de (diddl.denx.de [10.0.0.6]) by gemini.denx.de (Postfix) with ESMTP id 04F5A136320 for ; Tue, 19 Oct 2010 15:27:43 +0200 (CEST) Received: from diddl.denx.de (localhost.localdomain [127.0.0.1]) by diddl.denx.de (Postfix) with ESMTP id C6170348C9D1 for ; Tue, 19 Oct 2010 15:27:42 +0200 (CEST) Received: from pop.mnet-online.de by diddl.denx.de with POP3 (fetchmail-6.3.17) for (single-drop); Tue, 19 Oct 2010 15:27:42 +0200 (CEST) Received: from murder ([192.168.8.180]) by backend2 (Cyrus v2.2.12) with LMTPA; Tue, 19 Oct 2010 15:26:03 +0200 X-Sieve: CMU Sieve 2.2 Received: from mail.m-online.net (localhost [127.0.0.1]) by frontend1.mail.m-online.net (Cyrus v2.2.12) with LMTPA; Tue, 19 Oct 2010 15:26:02 +0200 Received: from scanner-1.m-online.net (scanner-1.mail.m-online.net [192.168.8.165]) by mail.m-online.net (Postfix) with ESMTP id B8B1C1C0020B; Tue, 19 Oct 2010 15:26:02 +0200 (CEST) Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by mxin-2.m-online.net (Postfix) with ESMTP id 26B3F46AF1D; Tue, 19 Oct 2010 15:25:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1F36728097; Tue, 19 Oct 2010 15:25:26 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3BVElcHL+xbE; Tue, 19 Oct 2010 15:25:25 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D47A3280A7; Tue, 19 Oct 2010 15:25:20 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1D53B2809D for ; Tue, 19 Oct 2010 15:25:18 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yNdhRLYrNUOU for ; Tue, 19 Oct 2010 15:25:16 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from nm2.bullet.mail.ukl.yahoo.com (nm2.bullet.mail.ukl.yahoo.com [217.146.183.219]) by theia.denx.de (Postfix) with SMTP id 067F528097 for ; Tue, 19 Oct 2010 15:25:13 +0200 (CEST) Received: from [217.146.183.181] by nm2.bullet.mail.ukl.yahoo.com with NNFMP; 19 Oct 2010 13:25:13 -0000 Received: from [217.146.183.63] by tm12.bullet.mail.ukl.yahoo.com with NNFMP; 19 Oct 2010 13:25:13 -0000 Received: from [127.0.0.1] by omp1032.mail.ukl.yahoo.com with NNFMP; 19 Oct 2010 13:25:09 -0000 X-Yahoo-Newman-Id: 201884.68208.bm@omp1032.mail.ukl.yahoo.com Received: (qmail 30539 invoked from network); 19 Oct 2010 13:18:29 -0000 Received: from phenom.research.lan (g_remlin@178.103.69.35 with plain) by smtp149.mail.ukl.yahoo.com with SMTP; 19 Oct 2010 13:18:29 +0000 GMT X-Yahoo-SMTP: cuoQNyCswBCkPlR5hugWtcAYMXb_2kD6BwSxvxHBn7VG_YHo X-YMail-OSG: yabOut4VM1mHgTabHCHhlRPkz2fR3ouaNuRm3LvsEI3lOqw 4H_Wzf5Wr9ras0BFSCHkK.xi9y4FBmdlYDWqpc7fqnF.LRgs3XdpA.7GzDvz Lsi0_fWknHVouB24gskpfF6UOF125nPz8aQyyoRzrs5Ekb4Z.vsPfvxj8uD8 jd5aw3rfcHRTY_gumR5QuXlJfeYGXJfRXP0OeAy1od7y0qiYn1Zk9ubkmlr3 VtaZcKs0e_9HPSQ-- X-Yahoo-Newman-Property: ymail-3 Message-ID: <4CBD9A93.9090301@rocketmail.com> Date: Tue, 19 Oct 2010 14:18:11 +0100 From: Gray Remlin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Lightning/1.0b3pre Thunderbird/3.1.4 ThunderBrowse/3.3.2 MIME-Version: 1.0 To: u-boot@lists.denx.de Subject: [U-Boot] [PATCH] kirkwood: Fix uninitialised DRAM struct X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Virus-Scanned: by amavisd-new at m-online.net Breaking out of the loop leaves the rest of the struct uninitialised Signed-off-by: Gray Remlin --- arch/arm/cpu/arm926ejs/kirkwood/dram.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) -- diff --git a/arch/arm/cpu/arm926ejs/kirkwood/dram.c b/arch/arm/cpu/arm926ejs/kirkwood/dram.c index 7439c87..50bed63 100644 --- a/arch/arm/cpu/arm926ejs/kirkwood/dram.c +++ b/arch/arm/cpu/arm926ejs/kirkwood/dram.c @@ -75,11 +75,8 @@ int dram_init(void) * If the gap is found, ram_size will be reported for * consecutive memory only */ - if (gd->bd->bi_dram[i].start != gd->ram_size) - break; - - gd->ram_size += gd->bd->bi_dram[i].size; - + if (gd->bd->bi_dram[i].start == gd->ram_size) + gd->ram_size += gd->bd->bi_dram[i].size; } return 0; }