提交 39dbb029 编写于 作者: B Brian Norris 提交者: David Woodhouse

mtd: nand: eliminate cast

Just make 'res' an int.
Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 b4d20d60
...@@ -1370,8 +1370,7 @@ int nand_default_bbt(struct mtd_info *mtd) ...@@ -1370,8 +1370,7 @@ int nand_default_bbt(struct mtd_info *mtd)
int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt) int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt)
{ {
struct nand_chip *this = mtd->priv; struct nand_chip *this = mtd->priv;
int block; int block, res;
uint8_t res;
block = (int)(offs >> this->bbt_erase_shift); block = (int)(offs >> this->bbt_erase_shift);
res = bbt_get_entry(this, block); res = bbt_get_entry(this, block);
...@@ -1380,7 +1379,7 @@ int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt) ...@@ -1380,7 +1379,7 @@ int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt)
"(block %d) 0x%02x\n", "(block %d) 0x%02x\n",
(unsigned int)offs, block, res); (unsigned int)offs, block, res);
switch ((int)res) { switch (res) {
case BBT_BLOCK_GOOD: case BBT_BLOCK_GOOD:
return 0; return 0;
case BBT_BLOCK_WORN: case BBT_BLOCK_WORN:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册