aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/nand_bbt.c
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2013-07-30 20:52:57 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2013-08-30 11:44:49 -0400
commit39dbb02998d859f0fa12c5b495fe90681ba45ce2 (patch)
tree1815dade526e48ac58e1e6efbe24147f916b4df9 /drivers/mtd/nand/nand_bbt.c
parentb4d20d601f1e2bbab46d25217303ccefe11e263e (diff)
mtd: nand: eliminate cast
Just make 'res' an int. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/nand_bbt.c')
-rw-r--r--drivers/mtd/nand/nand_bbt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 3ff9d367a624..3f18776592da 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -1370,8 +1370,7 @@ int nand_default_bbt(struct mtd_info *mtd)
1370int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt) 1370int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt)
1371{ 1371{
1372 struct nand_chip *this = mtd->priv; 1372 struct nand_chip *this = mtd->priv;
1373 int block; 1373 int block, res;
1374 uint8_t res;
1375 1374
1376 block = (int)(offs >> this->bbt_erase_shift); 1375 block = (int)(offs >> this->bbt_erase_shift);
1377 res = bbt_get_entry(this, block); 1376 res = bbt_get_entry(this, block);
@@ -1380,7 +1379,7 @@ int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt)
1380 "(block %d) 0x%02x\n", 1379 "(block %d) 0x%02x\n",
1381 (unsigned int)offs, block, res); 1380 (unsigned int)offs, block, res);
1382 1381
1383 switch ((int)res) { 1382 switch (res) {
1384 case BBT_BLOCK_GOOD: 1383 case BBT_BLOCK_GOOD:
1385 return 0; 1384 return 0;
1386 case BBT_BLOCK_WORN: 1385 case BBT_BLOCK_WORN: