diff mbox

[U-Boot,3/3] mpc83xx: km83xx_i2c - fix gcc 4.6 compiler warning

Message ID 1321433993-2488-3-git-send-email-kim.phillips@freescale.com
State Accepted
Commit 67eee06cf13ccbfa839979996dedd394f28462e6
Headers show

Commit Message

Kim Phillips Nov. 16, 2011, 8:59 a.m. UTC
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(-)

Comments

Heiko Schocher Nov. 16, 2011, 9:09 a.m. UTC | #1
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
Wolfgang Denk Nov. 16, 2011, 8:41 p.m. UTC | #2
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
diff mbox

Patch

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++;