mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][next] mtd: rawnand: remove redundant assignment to variable bbtblocks
@ 2024-02-09 17:40 Colin Ian King
  2024-02-26 10:45 ` Miquel Raynal
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2024-02-09 17:40 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra, linux-mtd
  Cc: kernel-janitors, linux-kernel

The variable bbtblocks is being assigned a value that is never
read. The assignment is redundant and can be removed.

Cleans up clang scan build warning:
drivers/mtd/nand/raw/nand_bbt.c:579:3: warning: Value stored to
'bbtblocks' is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/mtd/nand/raw/nand_bbt.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mtd/nand/raw/nand_bbt.c b/drivers/mtd/nand/raw/nand_bbt.c
index e4664fa6fd9e..a8fba5f39f59 100644
--- a/drivers/mtd/nand/raw/nand_bbt.c
+++ b/drivers/mtd/nand/raw/nand_bbt.c
@@ -576,7 +576,6 @@ static int search_bbt(struct nand_chip *this, uint8_t *buf,
 		startblock &= bbtblocks - 1;
 	} else {
 		chips = 1;
-		bbtblocks = mtd->size >> this->bbt_erase_shift;
 	}
 
 	for (i = 0; i < chips; i++) {
-- 
2.39.2


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

* Re: [PATCH][next] mtd: rawnand: remove redundant assignment to variable bbtblocks
  2024-02-09 17:40 [PATCH][next] mtd: rawnand: remove redundant assignment to variable bbtblocks Colin Ian King
@ 2024-02-26 10:45 ` Miquel Raynal
  0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2024-02-26 10:45 UTC (permalink / raw)
  To: Colin Ian King, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, linux-mtd
  Cc: kernel-janitors, linux-kernel

On Fri, 2024-02-09 at 17:40:19 UTC, Colin Ian King wrote:
> The variable bbtblocks is being assigned a value that is never
> read. The assignment is redundant and can be removed.
> 
> Cleans up clang scan build warning:
> drivers/mtd/nand/raw/nand_bbt.c:579:3: warning: Value stored to
> 'bbtblocks' is never read [deadcode.DeadStores]
> 
> 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

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

end of thread, other threads:[~2024-02-26 10:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-09 17:40 [PATCH][next] mtd: rawnand: remove redundant assignment to variable bbtblocks Colin Ian King
2024-02-26 10:45 ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®