]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arch/powerpc/cpu/mpc512x/i2c.c: Fix GCC 4.6 warnings
authorAnatolij Gustschin <agust@denx.de>
Thu, 10 Nov 2011 12:21:44 +0000 (12:21 +0000)
committerWolfgang Denk <wd@denx.de>
Wed, 16 Nov 2011 20:12:48 +0000 (21:12 +0100)
Fix:
i2c.c: In function 'wait_for_bb':
i2c.c:81:16: warning: variable 'temp' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
arch/powerpc/cpu/mpc512x/i2c.c

index e2d909751ef3afc972f02e713b4813064944b709..0ea12806b92c718648d8677bd9b5f61a12e13d10 100644 (file)
@@ -78,9 +78,8 @@ static int wait_for_bb (void)
        status = mpc_reg_in (&regs->msr);
 
        while (timeout-- && (status & I2C_BB)) {
-               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);