[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210910120023.46308-1-colin.king@canonical.com>
Date: Fri, 10 Sep 2021 13:00:23 +0100
From: Colin King <colin.king@...onical.com>
To: Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
linux-mtd@...ts.infradead.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] mtd: mtdswap: Remove redundant assignment of pointer eb
From: Colin Ian King <colin.king@...onical.com>
The pointer eb is being assigned a value that is never read, it is
being updated later on. The assignment is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
drivers/mtd/mtdswap.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c
index 7e309270ddd4..e86b04bc1d6b 100644
--- a/drivers/mtd/mtdswap.c
+++ b/drivers/mtd/mtdswap.c
@@ -716,7 +716,6 @@ static int mtdswap_move_block(struct mtdswap_dev *d, unsigned int oldblock,
return ret;
}
- eb = d->eb_data + *newblock / d->pages_per_eblk;
d->page_data[page] = *newblock;
d->revmap[oldblock] = PAGE_UNDEF;
eb = d->eb_data + oldblock / d->pages_per_eblk;
--
2.32.0
Powered by blists - more mailing lists