Patchwork [U-Boot,18/22] board/sacsng/sacsng.c: Fix GCC 4.6 build warning

login
register
mail settings
Submitter Wolfgang Denk
Date Nov. 5, 2011, 3:13 p.m.
Message ID <1320505999-9770-19-git-send-email-wd@denx.de>
Download mbox | patch
Permalink /patch/123878/
State Accepted
Commit f58902d0aa2147dce356239f069b2c063e8932e0
Headers show

Comments

Wolfgang Denk - Nov. 5, 2011, 3:13 p.m.
Fix:
sacsng.c: In function 'initdram':
sacsng.c:180:9: warning: variable 'spd_size' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Jerry Van Baren <gerald.vanbaren@smiths-aerospace.com>
---
 board/sacsng/sacsng.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
Wolfgang Denk - Nov. 7, 2011, 9:49 p.m.
Dear Wolfgang Denk,

In message <1320505999-9770-19-git-send-email-wd@denx.de> you wrote:
> Fix:
> sacsng.c: In function 'initdram':
> sacsng.c:180:9: warning: variable 'spd_size' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Jerry Van Baren <gerald.vanbaren@smiths-aerospace.com>
> ---
>  board/sacsng/sacsng.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/board/sacsng/sacsng.c b/board/sacsng/sacsng.c
index 09f59a0..536d7de 100644
--- a/board/sacsng/sacsng.c
+++ b/board/sacsng/sacsng.c
@@ -177,7 +177,6 @@  phys_size_t initdram(int board_type)
 	uint sdam;
 	uint bsma;
 	uint sda10;
-	u_char spd_size;
 	u_char data;
 	u_char cksum;
 	int j;
@@ -192,7 +191,6 @@  phys_size_t initdram(int board_type)
 	 * Read the SDRAM SPD EEPROM via I2C.
 	 */
 	i2c_read(SDRAM_SPD_ADDR, 0, 1, &data, 1);
-	spd_size = data;
 	cksum = data;
 	for (j = 1; j < 64; j++) {	/* read only the checksummed bytes */
 		/* note: the I2C address autoincrements when alen == 0 */