From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <Tudor.Ambarus@microchip.com>,
<linux-mtd@lists.infradead.org>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
ryan.barnett@collins.com,
Miquel Raynal <miquel.raynal@bootlin.com>
Subject: [PATCH 4/5] mtd: rawnand: omap: Various style fixes
Date: Thu, 10 Jun 2021 15:49:05 +0200 [thread overview]
Message-ID: <20210610134906.3503303-5-miquel.raynal@bootlin.com> (raw)
In-Reply-To: <20210610134906.3503303-1-miquel.raynal@bootlin.com>
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>
---
drivers/mtd/nand/raw/omap2.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/mtd/nand/raw/omap2.c b/drivers/mtd/nand/raw/omap2.c
index 4b2ad77db71d..71cd659cd876 100644
--- a/drivers/mtd/nand/raw/omap2.c
+++ b/drivers/mtd/nand/raw/omap2.c
@@ -1524,8 +1524,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)
@@ -1594,7 +1594,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
@@ -1607,8 +1607,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);
@@ -1641,8 +1643,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)
--
2.27.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2021-06-10 13:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 13:49 [PATCH 0/5] AM335x large page support Miquel Raynal
2021-06-10 13:49 ` [PATCH 1/5] mtd: rawnand: omap: Aggregate the HW configuration of the ELM Miquel Raynal
2021-06-11 19:01 ` Miquel Raynal
2021-06-10 13:49 ` [PATCH 2/5] mtd: rawnand: omap: Rename a macro Miquel Raynal
2021-06-10 13:49 ` [PATCH 3/5] mtd: rawnand: omap: Check return values Miquel Raynal
2021-06-11 19:01 ` Miquel Raynal
2021-06-10 13:49 ` Miquel Raynal [this message]
2021-06-11 19:01 ` [PATCH 4/5] mtd: rawnand: omap: Various style fixes Miquel Raynal
2021-06-10 13:49 ` [PATCH 5/5] mtd: rawnand: omap: Add larger page NAND chips support Miquel Raynal
2021-06-10 14:49 ` [External] " Barnett, Ryan J Collins
2021-06-11 19:01 ` Miquel Raynal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210610134906.3503303-5-miquel.raynal@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=Tudor.Ambarus@microchip.com \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=ryan.barnett@collins.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).