[U-Boot] powerpc: tqm834x: Fix build warnings in initdram()
Tom Rini
trini at konsulko.com
Mon Jan 25 22:30:13 CET 2016
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 <bmeng.cn at gmail.com>
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: <http://lists.denx.de/pipermail/u-boot/attachments/20160125/8083f1f2/attachment.sig>
More information about the U-Boot
mailing list