* [PATCH] mtd: mtdswap: Remove redundant assignment of pointer eb
@ 2021-09-10 12:00 Colin King
2021-09-14 17:38 ` Miquel Raynal
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-09-10 12:00 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra, linux-mtd
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.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@canonical.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: mtdswap: Remove redundant assignment of pointer eb
2021-09-10 12:00 [PATCH] mtd: mtdswap: Remove redundant assignment of pointer eb Colin King
@ 2021-09-14 17:38 ` Miquel Raynal
0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2021-09-14 17:38 UTC (permalink / raw)
To: Colin King, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, linux-mtd
Cc: kernel-janitors, linux-kernel
On Fri, 2021-09-10 at 12:00:23 UTC, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.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@canonical.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-14 17:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10 12:00 [PATCH] mtd: mtdswap: Remove redundant assignment of pointer eb Colin King
2021-09-14 17:38 ` Miquel Raynal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).