diff mbox

[U-Boot,14/14] board/emk/top860/top860.c: Fix GCC 4.6 build warning

Message ID 1322641077-829-15-git-send-email-wd@denx.de
State Accepted
Commit f008b17f8c2995996b5d100b71f8851d6f74a136
Headers show

Commit Message

Wolfgang Denk Nov. 30, 2011, 8:17 a.m. UTC
Fix:
top860.c: In function 'initdram':
top860.c:90:11: warning: variable 'j' set but not used
[-Wunused-but-set-variable]

Note: No attempts were made to convert this file completely to using
I/O accessors. This is left as an exercise for the board maintainer.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Reinhard Meyer <reinhard.meyer@emk-elektronik.de>
---
total: 0 errors, 0 warnings, 25 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE

 board/emk/top860/top860.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

Comments

Wolfgang Denk Dec. 1, 2011, 11:17 p.m. UTC | #1
Dear Wolfgang Denk,

In message <1322641077-829-15-git-send-email-wd@denx.de> you wrote:
> Fix:
> top860.c: In function 'initdram':
> top860.c:90:11: warning: variable 'j' set but not used
> [-Wunused-but-set-variable]
> 
> Note: No attempts were made to convert this file completely to using
> I/O accessors. This is left as an exercise for the board maintainer.
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Reinhard Meyer <reinhard.meyer@emk-elektronik.de>
> ---
> total: 0 errors, 0 warnings, 25 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
> 
>  board/emk/top860/top860.c |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/board/emk/top860/top860.c b/board/emk/top860/top860.c
index 76f7a0c..4df7f0e 100644
--- a/board/emk/top860/top860.c
+++ b/board/emk/top860/top860.c
@@ -34,6 +34,7 @@ 
 #include <common.h>
 #include <commproc.h>
 #include <mpc8xx.h>
+#include <asm/io.h>
 
 /*****************************************************************************
  * UPM table for 60ns EDO RAM at 25 MHz bus/external clock
@@ -87,7 +88,7 @@  phys_size_t initdram (int board_type)
 	 */
 	if ((ulong) initdram & 0xff000000) {
 		volatile uint *addr1, *addr2;
-		uint i, j;
+		uint i;
 
 		upmconfig (UPMA, (uint *) edo_60ns_25MHz_tbl,
 			   sizeof (edo_60ns_25MHz_tbl) / sizeof (uint));
@@ -100,8 +101,8 @@  phys_size_t initdram (int board_type)
 		 */
 		addr1 = (volatile uint *) 0;
 		addr2 = (volatile uint *) 0x00400000;
-		for (i = 0, j = 0; i < 8; i++)
-			j = addr1[0];
+		for (i = 0; i < 8; i++)
+			in_be32(addr1);
 
 		/*
 		 * Now check whether we got 4MB or 16MB populated