From: Anatolij Gustschin Date: Sat, 19 Nov 2011 02:51:38 +0000 (+0000) Subject: drivers/i2c/davinci_i2c.c: Fix GCC 4.6 warning X-Git-Tag: v2011.12-rc1~125 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bd0f5ca806c73f9e1ef4a2a0416233ab7e257df9;p=u-boot drivers/i2c/davinci_i2c.c: Fix GCC 4.6 warning Fix: davinci_i2c.c: In function 'flush_rx': davinci_i2c.c:81:6: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] Signed-off-by: Anatolij Gustschin Acked-by: Heiko Schocher --- diff --git a/drivers/i2c/davinci_i2c.c b/drivers/i2c/davinci_i2c.c index 5e3406dc8f..2abddfb6ff 100644 --- a/drivers/i2c/davinci_i2c.c +++ b/drivers/i2c/davinci_i2c.c @@ -78,13 +78,11 @@ static int poll_i2c_irq(int mask) void flush_rx(void) { - int dummy; - while (1) { if (!(REG(I2C_STAT) & I2C_STAT_RRDY)) break; - dummy = REG(I2C_DRR); + REG(I2C_DRR); REG(I2C_STAT) = I2C_STAT_RRDY; udelay(1000); }