aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/onenand
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2013-08-27 21:01:19 -0400
committerBrian Norris <computersforpeace@gmail.com>2013-10-27 19:27:03 -0400
commit6b7368c2305657c5b94ff18f2c8c8a6d7040b45a (patch)
treece79e93c8121cbf25c31106abd36db9e5bf26a19 /drivers/mtd/onenand
parentaaadd9819a128fb7ad988b6808581e3175859e2f (diff)
mtd: onenand: remove unused variable assignments
These variable assignments are never used (the variables are either never used or are overwritten before use). This resolves some compiler warnings like the following: drivers/mtd/onenand/onenand_base.c: In function 'flexonenand_get_boundary': drivers/mtd/onenand/onenand_base.c:3532:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] drivers/mtd/onenand/onenand_base.c: In function 'onenand_probe': drivers/mtd/onenand/onenand_base.c:3838:6: warning: variable 'maf_id' set but not used [-Wunused-but-set-variable] Signed-off-by: Brian Norris <computersforpeace@gmail.com> Cc: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/mtd/onenand')
-rw-r--r--drivers/mtd/onenand/onenand_base.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 7b7c1d21f612..1de33b5d3903 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -3525,7 +3525,7 @@ static int flexonenand_get_boundary(struct mtd_info *mtd)
3525{ 3525{
3526 struct onenand_chip *this = mtd->priv; 3526 struct onenand_chip *this = mtd->priv;
3527 unsigned die, bdry; 3527 unsigned die, bdry;
3528 int ret, syscfg, locked; 3528 int syscfg, locked;
3529 3529
3530 /* Disable ECC */ 3530 /* Disable ECC */
3531 syscfg = this->read_word(this->base + ONENAND_REG_SYS_CFG1); 3531 syscfg = this->read_word(this->base + ONENAND_REG_SYS_CFG1);
@@ -3536,7 +3536,7 @@ static int flexonenand_get_boundary(struct mtd_info *mtd)
3536 this->wait(mtd, FL_SYNCING); 3536 this->wait(mtd, FL_SYNCING);
3537 3537
3538 this->command(mtd, FLEXONENAND_CMD_READ_PI, die, 0); 3538 this->command(mtd, FLEXONENAND_CMD_READ_PI, die, 0);
3539 ret = this->wait(mtd, FL_READING); 3539 this->wait(mtd, FL_READING);
3540 3540
3541 bdry = this->read_word(this->base + ONENAND_DATARAM); 3541 bdry = this->read_word(this->base + ONENAND_DATARAM);
3542 if ((bdry >> FLEXONENAND_PI_UNLOCK_SHIFT) == 3) 3542 if ((bdry >> FLEXONENAND_PI_UNLOCK_SHIFT) == 3)
@@ -3546,7 +3546,7 @@ static int flexonenand_get_boundary(struct mtd_info *mtd)
3546 this->boundary[die] = bdry & FLEXONENAND_PI_MASK; 3546 this->boundary[die] = bdry & FLEXONENAND_PI_MASK;
3547 3547
3548 this->command(mtd, ONENAND_CMD_RESET, 0, 0); 3548 this->command(mtd, ONENAND_CMD_RESET, 0, 0);
3549 ret = this->wait(mtd, FL_RESETING); 3549 this->wait(mtd, FL_RESETING);
3550 3550
3551 printk(KERN_INFO "Die %d boundary: %d%s\n", die, 3551 printk(KERN_INFO "Die %d boundary: %d%s\n", die,
3552 this->boundary[die], locked ? "(Locked)" : "(Unlocked)"); 3552 this->boundary[die], locked ? "(Locked)" : "(Unlocked)");
@@ -3730,7 +3730,7 @@ static int flexonenand_set_boundary(struct mtd_info *mtd, int die,
3730 3730
3731 /* Check is boundary is locked */ 3731 /* Check is boundary is locked */
3732 this->command(mtd, FLEXONENAND_CMD_READ_PI, die, 0); 3732 this->command(mtd, FLEXONENAND_CMD_READ_PI, die, 0);
3733 ret = this->wait(mtd, FL_READING); 3733 this->wait(mtd, FL_READING);
3734 3734
3735 thisboundary = this->read_word(this->base + ONENAND_DATARAM); 3735 thisboundary = this->read_word(this->base + ONENAND_DATARAM);
3736 if ((thisboundary >> FLEXONENAND_PI_UNLOCK_SHIFT) != 3) { 3736 if ((thisboundary >> FLEXONENAND_PI_UNLOCK_SHIFT) != 3) {
@@ -3831,7 +3831,7 @@ static int onenand_chip_probe(struct mtd_info *mtd)
3831static int onenand_probe(struct mtd_info *mtd) 3831static int onenand_probe(struct mtd_info *mtd)
3832{ 3832{
3833 struct onenand_chip *this = mtd->priv; 3833 struct onenand_chip *this = mtd->priv;
3834 int maf_id, dev_id, ver_id; 3834 int dev_id, ver_id;
3835 int density; 3835 int density;
3836 int ret; 3836 int ret;
3837 3837
@@ -3839,8 +3839,7 @@ static int onenand_probe(struct mtd_info *mtd)
3839 if (ret) 3839 if (ret)
3840 return ret; 3840 return ret;
3841 3841
3842 /* Read manufacturer and device IDs from Register */ 3842 /* Device and version IDs from Register */
3843 maf_id = this->read_word(this->base + ONENAND_REG_MANUFACTURER_ID);
3844 dev_id = this->read_word(this->base + ONENAND_REG_DEVICE_ID); 3843 dev_id = this->read_word(this->base + ONENAND_REG_DEVICE_ID);
3845 ver_id = this->read_word(this->base + ONENAND_REG_VERSION_ID); 3844 ver_id = this->read_word(this->base + ONENAND_REG_VERSION_ID);
3846 this->technology = this->read_word(this->base + ONENAND_REG_TECHNOLOGY); 3845 this->technology = this->read_word(this->base + ONENAND_REG_TECHNOLOGY);