* [PATCH][V2] mtd: nand: marvell: remove redundant variable 'oob_len'
@ 2018-01-19 7:59 Colin King
2018-01-20 13:52 ` Boris Brezillon
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-01-19 7:59 UTC (permalink / raw)
To: Miquel Raynal, Boris Brezillon, Richard Weinberger,
David Woodhouse, Brian Norris, Marek Vasut, Cyrille Pitchen,
linux-mtd
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable oob_len is assigned and never read, hence it is redundant and
can be removed.
Cleans up clang warnings:
drivers/mtd/nand/marvell_nand.c:1356:6: warning: Value stored to 'oob_len'
during its initialization is never read
drivers/mtd/nand/marvell_nand.c:1369:4: warning: Value stored to 'oob_len'
is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/mtd/nand/marvell_nand.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c
index 4bd53b360277..f15ab37edf4e 100644
--- a/drivers/mtd/nand/marvell_nand.c
+++ b/drivers/mtd/nand/marvell_nand.c
@@ -1353,7 +1353,6 @@ static int marvell_nfc_hw_ecc_bch_write_page_raw(struct mtd_info *mtd,
int data_len = lt->data_bytes;
int spare_len = lt->spare_bytes;
int ecc_len = lt->ecc_bytes;
- int oob_len = spare_len + ecc_len;
int spare_offset = 0;
int ecc_offset = (lt->full_chunk_cnt * lt->spare_bytes) +
lt->last_spare_bytes;
@@ -1366,7 +1365,6 @@ static int marvell_nfc_hw_ecc_bch_write_page_raw(struct mtd_info *mtd,
data_len = lt->last_data_bytes;
spare_len = lt->last_spare_bytes;
ecc_len = lt->last_ecc_bytes;
- oob_len = spare_len + ecc_len;
}
/* Point to the column of the next chunk */
--
2.15.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][V2] mtd: nand: marvell: remove redundant variable 'oob_len'
2018-01-19 7:59 [PATCH][V2] mtd: nand: marvell: remove redundant variable 'oob_len' Colin King
@ 2018-01-20 13:52 ` Boris Brezillon
0 siblings, 0 replies; 2+ messages in thread
From: Boris Brezillon @ 2018-01-20 13:52 UTC (permalink / raw)
To: Colin King
Cc: Miquel Raynal, Richard Weinberger, David Woodhouse, Brian Norris,
Marek Vasut, Cyrille Pitchen, linux-mtd, kernel-janitors,
linux-kernel
On Fri, 19 Jan 2018 07:59:54 +0000
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable oob_len is assigned and never read, hence it is redundant and
> can be removed.
>
> Cleans up clang warnings:
>
> drivers/mtd/nand/marvell_nand.c:1356:6: warning: Value stored to 'oob_len'
> during its initialization is never read
> drivers/mtd/nand/marvell_nand.c:1369:4: warning: Value stored to 'oob_len'
> is never read
>
Applied.
Thanks,
Boris
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/mtd/nand/marvell_nand.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c
> index 4bd53b360277..f15ab37edf4e 100644
> --- a/drivers/mtd/nand/marvell_nand.c
> +++ b/drivers/mtd/nand/marvell_nand.c
> @@ -1353,7 +1353,6 @@ static int marvell_nfc_hw_ecc_bch_write_page_raw(struct mtd_info *mtd,
> int data_len = lt->data_bytes;
> int spare_len = lt->spare_bytes;
> int ecc_len = lt->ecc_bytes;
> - int oob_len = spare_len + ecc_len;
> int spare_offset = 0;
> int ecc_offset = (lt->full_chunk_cnt * lt->spare_bytes) +
> lt->last_spare_bytes;
> @@ -1366,7 +1365,6 @@ static int marvell_nfc_hw_ecc_bch_write_page_raw(struct mtd_info *mtd,
> data_len = lt->last_data_bytes;
> spare_len = lt->last_spare_bytes;
> ecc_len = lt->last_ecc_bytes;
> - oob_len = spare_len + ecc_len;
> }
>
> /* Point to the column of the next chunk */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-20 13:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-19 7:59 [PATCH][V2] mtd: nand: marvell: remove redundant variable 'oob_len' Colin King
2018-01-20 13:52 ` Boris Brezillon
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).