summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/onenand
diff options
context:
space:
mode:
authorChen Wandun <chenwandun@huawei.com>2019-11-22 13:08:54 +0100
committerMiquel Raynal <miquel.raynal@bootlin.com>2020-01-21 19:59:34 +0100
commit75b3ff79c5656d75b18501c56610f79596dd1441 (patch)
treebb9048e9b4e33c3ec6a6a82095947758d9d42943 /drivers/mtd/nand/onenand
parentmtd: onenand: Fix Kconfig indentation (diff)
downloadlinux-75b3ff79c5656d75b18501c56610f79596dd1441.tar.xz
linux-75b3ff79c5656d75b18501c56610f79596dd1441.zip
mtd: onenand: samsung: remove set but not used variable
Fixes gcc '-Wunused-but-set-variable' warning: drivers/mtd/nand/onenand/samsung_mtd.c: In function s3c_onenand_check_lock_status: drivers/mtd/nand/onenand/samsung_mtd.c:731:6: warning: variable tmp set but not used [-Wunused-but-set-variable] Signed-off-by: Chen Wandun <chenwandun@huawei.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand/onenand')
-rw-r--r--drivers/mtd/nand/onenand/samsung_mtd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/nand/onenand/samsung_mtd.c b/drivers/mtd/nand/onenand/samsung_mtd.c
index beb7987e4c2b..d61317a77a84 100644
--- a/drivers/mtd/nand/onenand/samsung_mtd.c
+++ b/drivers/mtd/nand/onenand/samsung_mtd.c
@@ -728,13 +728,12 @@ static void s3c_onenand_check_lock_status(struct mtd_info *mtd)
struct onenand_chip *this = mtd->priv;
struct device *dev = &onenand->pdev->dev;
unsigned int block, end;
- int tmp;
end = this->chipsize >> this->erase_shift;
for (block = 0; block < end; block++) {
unsigned int mem_addr = onenand->mem_addr(block, 0, 0);
- tmp = s3c_read_cmd(CMD_MAP_01(onenand, mem_addr));
+ s3c_read_cmd(CMD_MAP_01(onenand, mem_addr));
if (s3c_read_reg(INT_ERR_STAT_OFFSET) & LOCKED_BLK) {
dev_err(dev, "block %d is write-protected!\n", block);