[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180119075954.15009-1-colin.king@canonical.com>
Date: Fri, 19 Jan 2018 07:59:54 +0000
From: Colin King <colin.king@...onical.com>
To: Miquel Raynal <miquel.raynal@...e-electrons.com>,
Boris Brezillon <boris.brezillon@...e-electrons.com>,
Richard Weinberger <richard@....at>,
David Woodhouse <dwmw2@...radead.org>,
Brian Norris <computersforpeace@...il.com>,
Marek Vasut <marek.vasut@...il.com>,
Cyrille Pitchen <cyrille.pitchen@...ev4u.fr>,
linux-mtd@...ts.infradead.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH][V2] mtd: nand: marvell: remove redundant variable 'oob_len'
From: Colin Ian King <colin.king@...onical.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@...onical.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
Powered by blists - more mailing lists