[U-Boot] [PATCH 1/3] mpc83xx: spd_sdram - fix gcc 4.6 compiler warning

Configuring for sbc8349 board... spd_sdram.c: In function 'spd_sdram': spd_sdram.c:152:41: warning: variable 'trfc_high' set but not used [-Wunused-but-set-variable]
Signed-off-by: Kim Phillips kim.phillips@freescale.com --- arch/powerpc/cpu/mpc83xx/spd_sdram.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/cpu/mpc83xx/spd_sdram.c b/arch/powerpc/cpu/mpc83xx/spd_sdram.c index 3855bfd..04d519a 100644 --- a/arch/powerpc/cpu/mpc83xx/spd_sdram.c +++ b/arch/powerpc/cpu/mpc83xx/spd_sdram.c @@ -149,7 +149,7 @@ long int spd_sdram() unsigned int memsize; unsigned int law_size; unsigned char caslat, caslat_ctrl; - unsigned int trfc, trfc_clk, trfc_low, trfc_high; + unsigned int trfc, trfc_clk, trfc_low; unsigned int trcd_clk, trtp_clk; unsigned char cke_min_clk; unsigned char add_lat, wr_lat; @@ -542,7 +542,6 @@ long int spd_sdram() * so preadjust it down 8 first before splitting it up. */ trfc_low = (trfc_clk - 8) & 0xf; - trfc_high = ((trfc_clk - 8) >> 4) & 0x3;
ddr->timing_cfg_1 = (((picos_to_clk(spd.trp * 250) & 0x07) << 28 ) | /* PRETOACT */

Configuring for MPC8360EMDS_66_HOST_33 - Board: MPC8360EMDS, Options: CLKIN_66MHZ,PCI,PCI_33M,PQ_MDS_PIB=1 mpc8360emds.c: In function 'board_eth_init': mpc8360emds.c:178:12: warning: array subscript is above array bounds [-Warray-bounds]
Signed-off-by: Kim Phillips kim.phillips@freescale.com --- board/freescale/mpc8360emds/mpc8360emds.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/board/freescale/mpc8360emds/mpc8360emds.c b/board/freescale/mpc8360emds/mpc8360emds.c index be76774..bdd1293 100644 --- a/board/freescale/mpc8360emds/mpc8360emds.c +++ b/board/freescale/mpc8360emds/mpc8360emds.c @@ -172,10 +172,11 @@ int board_eth_init(bd_t *bd) if (board_handle_erratum2()) { int i;
- for (i = 0; i < ARRAY_SIZE(uec_info); i++) + for (i = 0; i < ARRAY_SIZE(uec_info); i++) { uec_info[i].enet_interface_type = PHY_INTERFACE_MODE_RGMII_RXID; uec_info[i].speed = SPEED_1000; + } } return uec_eth_init(bd, uec_info, ARRAY_SIZE(uec_info)); }

Dear Kim Phillips,
In message 1321433993-2488-2-git-send-email-kim.phillips@freescale.com you wrote:
Configuring for MPC8360EMDS_66_HOST_33 - Board: MPC8360EMDS, Options: CLKIN_66MHZ,PCI,PCI_33M,PQ_MDS_PIB=1 mpc8360emds.c: In function 'board_eth_init': mpc8360emds.c:178:12: warning: array subscript is above array bounds [-Warray-bounds]
Signed-off-by: Kim Phillips kim.phillips@freescale.com
board/freescale/mpc8360emds/mpc8360emds.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/board/freescale/mpc8360emds/mpc8360emds.c b/board/freescale/mpc8360emds/mpc8360emds.c index be76774..bdd1293 100644 --- a/board/freescale/mpc8360emds/mpc8360emds.c +++ b/board/freescale/mpc8360emds/mpc8360emds.c @@ -172,10 +172,11 @@ int board_eth_init(bd_t *bd) if (board_handle_erratum2()) { int i;
for (i = 0; i < ARRAY_SIZE(uec_info); i++)
for (i = 0; i < ARRAY_SIZE(uec_info); i++) { uec_info[i].enet_interface_type = PHY_INTERFACE_MODE_RGMII_RXID; uec_info[i].speed = SPEED_1000;
} return uec_eth_init(bd, uec_info, ARRAY_SIZE(uec_info));}
Seems we caught a real error here? Great! Thanks!
Applied, thanks.
Best regards,
Wolfgang Denk

Configuring for kmeter1 board... km83xx_i2c.c: In function 'i2c_make_abort': km83xx_i2c.c:44:8: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
Signed-off-by: Kim Phillips kim.phillips@freescale.com --- board/keymile/km83xx/km83xx_i2c.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/board/keymile/km83xx/km83xx_i2c.c b/board/keymile/km83xx/km83xx_i2c.c index be17775..8df92d8 100644 --- a/board/keymile/km83xx/km83xx_i2c.c +++ b/board/keymile/km83xx/km83xx_i2c.c @@ -41,7 +41,6 @@ int i2c_make_abort(void) { struct fsl_i2c *dev; dev = (struct fsl_i2c *) (CONFIG_SYS_IMMR + CONFIG_SYS_I2C_OFFSET); - uchar dummy; uchar last; int nbr_read = 0; int i = 0; @@ -52,7 +51,7 @@ int i2c_make_abort(void) udelay(DELAY_ABORT_SEQ); out_8(&dev->cr, (I2C_CR_MEN | I2C_CR_MSTA)); udelay(DELAY_ABORT_SEQ); - dummy = in_8(&dev->dr); + in_8(&dev->dr); udelay(DELAY_ABORT_SEQ); last = in_8(&dev->dr); nbr_read++;

Hello Kim,
Kim Phillips wrote:
Configuring for kmeter1 board... km83xx_i2c.c: In function 'i2c_make_abort': km83xx_i2c.c:44:8: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
Signed-off-by: Kim Phillips kim.phillips@freescale.com
board/keymile/km83xx/km83xx_i2c.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
Thanks for fixing,
Acked-by: Heiko Schocher hs@denx.de
bye, Heiko

Dear Kim Phillips,
In message 1321433993-2488-3-git-send-email-kim.phillips@freescale.com you wrote:
Configuring for kmeter1 board... km83xx_i2c.c: In function 'i2c_make_abort': km83xx_i2c.c:44:8: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
Signed-off-by: Kim Phillips kim.phillips@freescale.com
board/keymile/km83xx/km83xx_i2c.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

Dear Kim Phillips,
In message 1321433993-2488-1-git-send-email-kim.phillips@freescale.com you wrote:
Configuring for sbc8349 board... spd_sdram.c: In function 'spd_sdram': spd_sdram.c:152:41: warning: variable 'trfc_high' set but not used [-Wunused-but-set-variable]
Signed-off-by: Kim Phillips kim.phillips@freescale.com
arch/powerpc/cpu/mpc83xx/spd_sdram.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
participants (3)
-
Heiko Schocher
-
Kim Phillips
-
Wolfgang Denk