mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
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>
This commit is contained in:
parent
b4d20d601f
commit
39dbb02998
1 changed files with 2 additions and 3 deletions
|
@ -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)
|
||||
{
|
||||
struct nand_chip *this = mtd->priv;
|
||||
int block;
|
||||
uint8_t res;
|
||||
int block, res;
|
||||
|
||||
block = (int)(offs >> this->bbt_erase_shift);
|
||||
res = bbt_get_entry(this, block);
|
||||
|
@ -1380,7 +1379,7 @@ int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt)
|
|||
"(block %d) 0x%02x\n",
|
||||
(unsigned int)offs, block, res);
|
||||
|
||||
switch ((int)res) {
|
||||
switch (res) {
|
||||
case BBT_BLOCK_GOOD:
|
||||
return 0;
|
||||
case BBT_BLOCK_WORN:
|
||||
|
|
Loading…
Reference in a new issue