summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2021-06-10 15:49:05 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2021-06-18 09:45:21 +0200
commit496030b1b71e2129ce2cf1411f18ee55ec305ab6 (patch)
treeaee9a1080a22a0adf3cacf6077b7b503fbe7a48b /drivers
parent11a017782852ad6a59d7a449b69478ddc1d30cf0 (diff)
mtd: rawnand: omap: Various style fixes
Fix the comments style, declare the variables in a reverse Christmas tree order, add an upper case character at the beginning of a sentence. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210610134906.3503303-5-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/raw/omap2.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/mtd/nand/raw/omap2.c b/drivers/mtd/nand/raw/omap2.c
index bb28f2b0ecef..3d5a421a6b5c 100644
--- a/drivers/mtd/nand/raw/omap2.c
+++ b/drivers/mtd/nand/raw/omap2.c
@@ -1525,8 +1525,8 @@ static int omap_write_page_bch(struct nand_chip *chip, const uint8_t *buf,
int oob_required, int page)
{
struct mtd_info *mtd = nand_to_mtd(chip);
- int ret;
uint8_t *ecc_calc = chip->ecc.calc_buf;
+ int ret;
ret = nand_prog_page_begin_op(chip, page, 0, NULL, 0);
if (ret)
@@ -1595,7 +1595,7 @@ static int omap_write_subpage_bch(struct nand_chip *chip, u32 offset,
chip->legacy.write_buf(chip, buf, mtd->writesize);
for (step = 0; step < ecc_steps; step++) {
- /* mask ECC of un-touched subpages by padding 0xFF */
+ /* Mask ECC of un-touched subpages with 0xFFs */
if (step < start_step || step > end_step)
memset(ecc_calc, 0xff, ecc_bytes);
else
@@ -1608,8 +1608,10 @@ static int omap_write_subpage_bch(struct nand_chip *chip, u32 offset,
ecc_calc += ecc_bytes;
}
- /* copy calculated ECC for whole page to chip->buffer->oob */
- /* this include masked-value(0xFF) for unwritten subpages */
+ /*
+ * Copy the calculated ECC for the whole page including the
+ * masked values (0xFF) corresponding to unwritten subpages.
+ */
ecc_calc = chip->ecc.calc_buf;
ret = mtd_ooblayout_set_eccbytes(mtd, ecc_calc, chip->oob_poi, 0,
chip->ecc.total);
@@ -1642,8 +1644,8 @@ static int omap_read_page_bch(struct nand_chip *chip, uint8_t *buf,
struct mtd_info *mtd = nand_to_mtd(chip);
uint8_t *ecc_calc = chip->ecc.calc_buf;
uint8_t *ecc_code = chip->ecc.code_buf;
- int stat, ret;
unsigned int max_bitflips = 0;
+ int stat, ret;
ret = nand_read_page_op(chip, page, 0, NULL, 0);
if (ret)