From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 25 Jan 2016 16:30:13 -0500 Subject: [U-Boot] powerpc: tqm834x: Fix build warnings in initdram() In-Reply-To: <1453710595-26324-1-git-send-email-bmeng.cn@gmail.com> References: <1453710595-26324-1-git-send-email-bmeng.cn@gmail.com> Message-ID: <20160125213013.GL3359@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Jan 25, 2016 at 12:29:55AM -0800, Bin Meng wrote: > With gcc 4.9, it produces the following warnings: > > CC board/tqc/tqm834x/tqm834x.o > board/tqc/tqm834x/tqm834x.c: In function 'initdram': > board/tqc/tqm834x/tqm834x.c:325:12: warning: iteration 3u invokes undefined behavior [-Waggressive-loop-optimizations] > (((base + size - 1) >> CSBNDS_EA_SHIFT) & > ^ > board/tqc/tqm834x/tqm834x.c:80:2: note: containing loop > for(cs = 0; cs < 4; ++cs) { > ^ > > There is an integer overflow when cs = 3. To fix it, change > parameters of set_cs_bounds() to ulong. > > Signed-off-by: Bin Meng Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: