Skip to contentSkip to conversation

arch/powerpc/cpu/mpc512x/pci.c: Fix GCC 4.6 warnings

PATCH New Anatolij Gustschin 2 participants 4 messages Nov 10, 2011 – Nov 16, 2011 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 arch/powerpc/cpu/mpc512x/pci.c: Fix GCC 4.6 warnings

Fix:
pci.c: In function 'pci_init_board':
pci.c:55:26: warning: variable 'pci_conf' set but not used [-Wunused-but-set-variable]

---
 arch/powerpc/cpu/mpc512x/pci.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
arch/powerpc/cpu/mpc512x/pci.c +0 -2
index 141db8b..16f034d 100644
@@ -52,7 +52,6 @@ pci_init_board(void)
 	volatile law512x_t *pci_law;
 	volatile pot512x_t *pci_pot;
 	volatile pcictrl512x_t *pci_ctrl;
-	volatile pciconf512x_t *pci_conf;
 	u16 reg16;
 	u32 reg32;
 	u32 dev;
@@ -73,7 +72,6 @@ pci_init_board(void)
 	pci_law = im->sysconf.pcilaw;
 	pci_pot = im->ios.pot;
 	pci_ctrl = &im->pci_ctrl;
-	pci_conf = &im->pci_conf;
 
 	hose = &pci_hose;
 
Signature · 1 line
1.7.6.4
#1 lore raw

PATCH 2/2 arch/powerpc/cpu/mpc512x/i2c.c: Fix GCC 4.6 warnings

Fix:
i2c.c: In function 'wait_for_bb':
i2c.c:81:16: warning: variable 'temp' set but not used [-Wunused-but-set-variable]

---
 arch/powerpc/cpu/mpc512x/i2c.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
arch/powerpc/cpu/mpc512x/i2c.c +1 -2
index e2d9097..0ea1280 100644
@@ -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);
Signature · 1 line
1.7.6.4
#3 lore raw

PATCH 1/2 arch/powerpc/cpu/mpc512x/pci.c: Fix GCC 4.6 warnings

In reply to Anatolij Gustschin

Dear Anatolij Gustschin,

Quoted 9 lines · In message <[email protected]> you wrote:

Fix:
pci.c: In function 'pci_init_board':
pci.c:55:26: warning: variable 'pci_conf' set but not used [-Wunused-but-set-variable]

---
 arch/powerpc/cpu/mpc512x/pci.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Lots of folks confuse bad management with destiny.   -- Frank Hubbard
#2 lore raw

PATCH 2/2 arch/powerpc/cpu/mpc512x/i2c.c: Fix GCC 4.6 warnings

In reply to Anatolij Gustschin

Dear Anatolij Gustschin,

Quoted 9 lines · In message <[email protected]> you wrote:

Fix:
i2c.c: In function 'wait_for_bb':
i2c.c:81:16: warning: variable 'temp' set but not used [-Wunused-but-set-variable]

---
 arch/powerpc/cpu/mpc512x/i2c.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Of all the things I've lost, I miss my mind the most.