Skip to contentSkip to conversation

powerpc/8xxx: Fix compile warning when build for a DDR1 or DDR2 board

PATCH New Kumar Gala 1 participant 2 messages Jan 20, 2011 PowerPC

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 powerpc/8xxx: Fix compile warning when build for a DDR1 or DDR2 board

ctrl_regs.c: In function 'set_ddr_sdram_mode_2':
ctrl_regs.c:690:6: warning: unused variable 'i'

'i' is only used by DDR3 code.

---
 arch/powerpc/cpu/mpc8xxx/ddr/ctrl_regs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/cpu/mpc8xxx/ddr/ctrl_regs.c +1 -1
index 2271071..c3e1d76 100644
@@ -687,9 +687,9 @@ static void set_ddr_sdram_mode_2(fsl_ddr_cfg_regs_t *ddr,
 {
 	unsigned short esdmode2 = 0;	/* Extended SDRAM mode 2 */
 	unsigned short esdmode3 = 0;	/* Extended SDRAM mode 3 */
-	int i;
 
 #if defined(CONFIG_FSL_DDR3)
+	int i;
 	unsigned int rtt_wr = 0;	/* Rtt_WR - dynamic ODT off */
 	unsigned int srt = 0;	/* self-refresh temerature, normal range */
 	unsigned int asr = 0;	/* auto self-refresh disable */
Signature · 1 line
1.7.2.3
author Applied
#1 lore raw

PATCH 1/1 powerpc/8xxx: Fix compile warning when build for a DDR1 or DDR2 board

Quoted 9 lines · Kumar Gala

ctrl_regs.c: In function 'set_ddr_sdram_mode_2':
ctrl_regs.c:690:6: warning: unused variable 'i'

'i' is only used by DDR3 code.

---
arch/powerpc/cpu/mpc8xxx/ddr/ctrl_regs.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)

applied

- k