Linux-mtd Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] nand: onenand: samsung: remove variable 'tmp' set but not used
@ 2019-11-22 12:08 Chen Wandun
  2020-01-14 17:08 ` Miquel Raynal
  0 siblings, 1 reply; 3+ messages in thread
From: Chen Wandun @ 2019-11-22 12:08 UTC (permalink / raw)
  To: kyungmin.park, miquel.raynal, richard, vigneshr, linux-mtd, linux-kernel
  Cc: chenwandun

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>
---
 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


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nand: onenand: samsung: remove variable 'tmp' set but not used
  2019-11-22 12:08 [PATCH] nand: onenand: samsung: remove variable 'tmp' set but not used Chen Wandun
@ 2020-01-14 17:08 ` Miquel Raynal
  2020-01-14 17:29   ` Miquel Raynal
  0 siblings, 1 reply; 3+ messages in thread
From: Miquel Raynal @ 2020-01-14 17:08 UTC (permalink / raw)
  To: Chen Wandun, kyungmin.park, miquel.raynal, richard, vigneshr,
	linux-mtd, linux-kernel

On Fri, 2019-11-22 at 12:08:54 UTC, Chen Wandun wrote:
> 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>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nand: onenand: samsung: remove variable 'tmp' set but not used
  2020-01-14 17:08 ` Miquel Raynal
@ 2020-01-14 17:29   ` Miquel Raynal
  0 siblings, 0 replies; 3+ messages in thread
From: Miquel Raynal @ 2020-01-14 17:29 UTC (permalink / raw)
  To: Chen Wandun, kyungmin.park, miquel.raynal, richard, vigneshr,
	linux-mtd, linux-kernel

Hello,

Miquel Raynal <miquel.raynal@bootlin.com> wrote on Tue, 14 Jan 2020
18:08:49 +0100:

> On Fri, 2019-11-22 at 12:08:54 UTC, Chen Wandun wrote:
> > 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>  
> 
> Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

As an FYI, the subject prefix should have been "mtd: onenand: samsung:". I
changed it before applying.


Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22 12:08 [PATCH] nand: onenand: samsung: remove variable 'tmp' set but not used Chen Wandun
2020-01-14 17:08 ` Miquel Raynal
2020-01-14 17:29   ` Miquel Raynal

Linux-mtd Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mtd/0 linux-mtd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mtd linux-mtd/ https://lore.kernel.org/linux-mtd \
		linux-mtd@lists.infradead.org
	public-inbox-index linux-mtd

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-mtd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git