Commit 6b7368c2 authored by Brian Norris's avatar Brian Norris

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: default avatarBrian Norris <computersforpeace@gmail.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
parent aaadd981
...@@ -3525,7 +3525,7 @@ static int flexonenand_get_boundary(struct mtd_info *mtd) ...@@ -3525,7 +3525,7 @@ static int flexonenand_get_boundary(struct mtd_info *mtd)
{ {
struct onenand_chip *this = mtd->priv; struct onenand_chip *this = mtd->priv;
unsigned die, bdry; unsigned die, bdry;
int ret, syscfg, locked; int syscfg, locked;
/* Disable ECC */ /* Disable ECC */
syscfg = this->read_word(this->base + ONENAND_REG_SYS_CFG1); syscfg = this->read_word(this->base + ONENAND_REG_SYS_CFG1);
...@@ -3536,7 +3536,7 @@ static int flexonenand_get_boundary(struct mtd_info *mtd) ...@@ -3536,7 +3536,7 @@ static int flexonenand_get_boundary(struct mtd_info *mtd)
this->wait(mtd, FL_SYNCING); this->wait(mtd, FL_SYNCING);
this->command(mtd, FLEXONENAND_CMD_READ_PI, die, 0); this->command(mtd, FLEXONENAND_CMD_READ_PI, die, 0);
ret = this->wait(mtd, FL_READING); this->wait(mtd, FL_READING);
bdry = this->read_word(this->base + ONENAND_DATARAM); bdry = this->read_word(this->base + ONENAND_DATARAM);
if ((bdry >> FLEXONENAND_PI_UNLOCK_SHIFT) == 3) if ((bdry >> FLEXONENAND_PI_UNLOCK_SHIFT) == 3)
...@@ -3546,7 +3546,7 @@ static int flexonenand_get_boundary(struct mtd_info *mtd) ...@@ -3546,7 +3546,7 @@ static int flexonenand_get_boundary(struct mtd_info *mtd)
this->boundary[die] = bdry & FLEXONENAND_PI_MASK; this->boundary[die] = bdry & FLEXONENAND_PI_MASK;
this->command(mtd, ONENAND_CMD_RESET, 0, 0); this->command(mtd, ONENAND_CMD_RESET, 0, 0);
ret = this->wait(mtd, FL_RESETING); this->wait(mtd, FL_RESETING);
printk(KERN_INFO "Die %d boundary: %d%s\n", die, printk(KERN_INFO "Die %d boundary: %d%s\n", die,
this->boundary[die], locked ? "(Locked)" : "(Unlocked)"); this->boundary[die], locked ? "(Locked)" : "(Unlocked)");
...@@ -3730,7 +3730,7 @@ static int flexonenand_set_boundary(struct mtd_info *mtd, int die, ...@@ -3730,7 +3730,7 @@ static int flexonenand_set_boundary(struct mtd_info *mtd, int die,
/* Check is boundary is locked */ /* Check is boundary is locked */
this->command(mtd, FLEXONENAND_CMD_READ_PI, die, 0); this->command(mtd, FLEXONENAND_CMD_READ_PI, die, 0);
ret = this->wait(mtd, FL_READING); this->wait(mtd, FL_READING);
thisboundary = this->read_word(this->base + ONENAND_DATARAM); thisboundary = this->read_word(this->base + ONENAND_DATARAM);
if ((thisboundary >> FLEXONENAND_PI_UNLOCK_SHIFT) != 3) { if ((thisboundary >> FLEXONENAND_PI_UNLOCK_SHIFT) != 3) {
...@@ -3831,7 +3831,7 @@ static int onenand_chip_probe(struct mtd_info *mtd) ...@@ -3831,7 +3831,7 @@ static int onenand_chip_probe(struct mtd_info *mtd)
static int onenand_probe(struct mtd_info *mtd) static int onenand_probe(struct mtd_info *mtd)
{ {
struct onenand_chip *this = mtd->priv; struct onenand_chip *this = mtd->priv;
int maf_id, dev_id, ver_id; int dev_id, ver_id;
int density; int density;
int ret; int ret;
...@@ -3839,8 +3839,7 @@ static int onenand_probe(struct mtd_info *mtd) ...@@ -3839,8 +3839,7 @@ static int onenand_probe(struct mtd_info *mtd)
if (ret) if (ret)
return ret; return ret;
/* Read manufacturer and device IDs from Register */ /* Device and version IDs from Register */
maf_id = this->read_word(this->base + ONENAND_REG_MANUFACTURER_ID);
dev_id = this->read_word(this->base + ONENAND_REG_DEVICE_ID); dev_id = this->read_word(this->base + ONENAND_REG_DEVICE_ID);
ver_id = this->read_word(this->base + ONENAND_REG_VERSION_ID); ver_id = this->read_word(this->base + ONENAND_REG_VERSION_ID);
this->technology = this->read_word(this->base + ONENAND_REG_TECHNOLOGY); this->technology = this->read_word(this->base + ONENAND_REG_TECHNOLOGY);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment