[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1574424534-141265-1-git-send-email-chenwandun@huawei.com>
Date: Fri, 22 Nov 2019 20:08:54 +0800
From: Chen Wandun <chenwandun@...wei.com>
To: <kyungmin.park@...sung.com>, <miquel.raynal@...tlin.com>,
<richard@....at>, <vigneshr@...com>,
<linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
CC: <chenwandun@...wei.com>
Subject: [PATCH] nand: onenand: samsung: remove variable 'tmp' set but not used
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@...wei.com>
---
drivers/mtd/nand/onenand/samsung_mtd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/onenand/samsung_mtd.c b/drivers/mtd/nand/onenand/samsung_mtd.c
index 55e5536..3573b12 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);
--
2.7.4
Powered by blists - more mailing lists