* [PATCH] mtd: onenand: remove redundant variable ooblen
@ 2021-12-05 23:07 Colin Ian King
2021-12-09 16:50 ` Miquel Raynal
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2021-12-05 23:07 UTC (permalink / raw)
To: Kyungmin Park, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, linux-mtd
Cc: kernel-janitors, linux-kernel
Variable ooblen is being initialized with a value that is never read.
The variable is never used after this, so it is redundant and can be
removed.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/mtd/nand/onenand/onenand_bbt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/onenand/onenand_bbt.c b/drivers/mtd/nand/onenand/onenand_bbt.c
index def89f108007..b17315f8e1d4 100644
--- a/drivers/mtd/nand/onenand/onenand_bbt.c
+++ b/drivers/mtd/nand/onenand/onenand_bbt.c
@@ -60,7 +60,7 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr
int i, j, numblocks, len, scanlen;
int startblock;
loff_t from;
- size_t readlen, ooblen;
+ size_t readlen;
struct mtd_oob_ops ops;
int rgn;
@@ -69,7 +69,7 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr
len = 2;
/* We need only read few bytes from the OOB area */
- scanlen = ooblen = 0;
+ scanlen = 0;
readlen = bd->len;
/* chip == -1 case only */
--
2.33.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: onenand: remove redundant variable ooblen
2021-12-05 23:07 [PATCH] mtd: onenand: remove redundant variable ooblen Colin Ian King
@ 2021-12-09 16:50 ` Miquel Raynal
0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2021-12-09 16:50 UTC (permalink / raw)
To: Colin Ian King, Kyungmin Park, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, linux-mtd
Cc: kernel-janitors, linux-kernel
On Sun, 2021-12-05 at 23:07:29 UTC, Colin Ian King wrote:
> Variable ooblen is being initialized with a value that is never read.
> The variable is never used after this, so it is redundant and can be
> removed.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.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] 2+ messages in thread
end of thread, other threads:[~2021-12-09 16:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-05 23:07 [PATCH] mtd: onenand: remove redundant variable ooblen Colin Ian King
2021-12-09 16:50 ` Miquel Raynal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox