mtd: nand: eliminate cast

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Aug 30 16:59:01 EDT 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=39dbb02998d859f0fa12c5b495fe90681ba45ce2
Commit:     39dbb02998d859f0fa12c5b495fe90681ba45ce2
Parent:     b4d20d601f1e2bbab46d25217303ccefe11e263e
Author:     Brian Norris <computersforpeace at gmail.com>
AuthorDate: Tue Jul 30 17:52:57 2013 -0700
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Aug 30 16:44:49 2013 +0100

    mtd: nand: eliminate cast
    
    Just make 'res' an int.
    
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/nand_bbt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 3ff9d36..3f18776 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)
 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:



More information about the linux-mtd-cvs mailing list