]> git.sur5r.net Git - u-boot/commitdiff
arch/powerpc/cpu/mpc5xxx/i2c.c: fix GC 4.6 build warnings
authorWolfgang Denk <wd@denx.de>
Fri, 4 Nov 2011 15:55:06 +0000 (15:55 +0000)
committerWolfgang Denk <wd@denx.de>
Mon, 7 Nov 2011 21:09:27 +0000 (22:09 +0100)
Fix:
i2c.c: In function 'wait_for_bb':
i2c.c:104:16: warning: variable 'temp' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
arch/powerpc/cpu/mpc5xxx/i2c.c

index f9d293b7ce7d96ffaff1357e5d84195c582ad6e7..b423d2fe3416a0bfde16ccb9b33f54330f0e9b36 100644 (file)
@@ -100,14 +100,11 @@ static int wait_for_bb(void)
        status = mpc_reg_in(&regs->msr);
 
        while (timeout-- && (status & I2C_BB)) {
-#if 1
-               volatile int temp;
                mpc_reg_out(&regs->mcr, I2C_STA, I2C_STA);
-               temp = mpc_reg_in(&regs->mdr);
+               (void)mpc_reg_in(&regs->mdr);
                mpc_reg_out(&regs->mcr, 0, I2C_STA);
                mpc_reg_out(&regs->mcr, 0, 0);
                mpc_reg_out(&regs->mcr, I2C_EN, 0);
-#endif
                udelay(15);
                status = mpc_reg_in(&regs->msr);
        }