Skip to contentSkip to conversation

mpc85xx/T104xRDB: Remove vbank check redundant code

PATCH New Priyanka Jain 2 participants 2 messages Jul 30, 2015 – Jul 31, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mpc85xx/T104xRDB: Remove vbank check redundant code

sw variable in checkboard function is storing vbank value which can only take 3-bit value.
So check of sw value for if greater than 7 is redundant.

---
Changes for v2:
Corrected description to check is for 3-bit value

 board/freescale/t104xrdb/t104xrdb.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
board/freescale/t104xrdb/t104xrdb.c +1 -4
index 9cd5e15..c34eea6 100644
@@ -35,10 +35,7 @@ int checkboard(void)
 	sw = CPLD_READ(flash_ctl_status);
 	sw = ((sw & CPLD_LBMAP_MASK) >> CPLD_LBMAP_SHIFT);
 
-	if (sw <= 7)
-		printf("vBank: %d\n", sw);
-	else
-		printf("Unsupported Bank=%x\n", sw);
+	printf("vBank: %d\n", sw);
 
 	return 0;
 }
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH v2 1/1 mpc85xx/T104xRDB: Remove vbank check redundant code

Quoted 8 lines · Priyanka Jain

sw variable in checkboard function is storing vbank value which can only take 3-bit value.
So check of sw value for if greater than 7 is redundant.

---
Changes for v2:
Corrected description to check is for 3-bit value

Applied to u-boot-mpc85xx master after fixing subject.

Thanks.

York