linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Richard Weinberger <richard@nod.at>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	Mason <slash.tmp@free.fr>, Sebastian Frias <sf84@laposte.net>
Subject: [PATCH v3 3/3] mtd: nand: tango: Cleanup raw_write and raw_read
Date: Tue, 15 Nov 2016 11:08:19 +0100	[thread overview]
Message-ID: <582ADE93.4010003@sigmadesigns.com> (raw)
In-Reply-To: <20161114183819.0a954b36@bbrezillon>

Drop raw_write return value (no longer used).
Drop raw_read  return value (for symmetry).

Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
---
 drivers/mtd/nand/tango_nand.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/mtd/nand/tango_nand.c b/drivers/mtd/nand/tango_nand.c
index bacc2a02b7fe..7ed35348993e 100644
--- a/drivers/mtd/nand/tango_nand.c
+++ b/drivers/mtd/nand/tango_nand.c
@@ -343,7 +343,7 @@ static void aux_write(struct nand_chip *chip, const u8 **buf, int len, int *pos)
  * buf = |      PKT_0      | ... |      PKT_N      |
  *       +-----------------+-----+-----------------+
  */
-static int raw_read(struct nand_chip *chip, u8 *buf, u8 *oob)
+static void raw_read(struct nand_chip *chip, u8 *buf, u8 *oob)
 {
 	u8 *oob_orig = oob;
 	const int page_size = chip->mtd.writesize;
@@ -367,11 +367,9 @@ static int raw_read(struct nand_chip *chip, u8 *buf, u8 *oob)
 	aux_read(chip, &oob_orig, BBM_SIZE, &pos);
 	aux_read(chip, &buf, pkt_size - rem, &pos);
 	aux_read(chip, &oob, ecc_size, &pos);
-
-	return 0;
 }
 
-static int raw_write(struct nand_chip *chip, const u8 *buf, const u8 *oob)
+static void raw_write(struct nand_chip *chip, const u8 *buf, const u8 *oob)
 {
 	const u8 *oob_orig = oob;
 	const int page_size = chip->mtd.writesize;
@@ -395,15 +393,14 @@ static int raw_write(struct nand_chip *chip, const u8 *buf, const u8 *oob)
 	aux_write(chip, &oob_orig, BBM_SIZE, &pos);
 	aux_write(chip, &buf, pkt_size - rem, &pos);
 	aux_write(chip, &oob, ecc_size, &pos);
-
-	return 0;
 }
 
 static int tango_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
 			       u8 *buf, int oob_required, int page)
 {
 	chip->cmdfunc(mtd, NAND_CMD_READ0, 0, page);
-	return raw_read(chip, buf, chip->oob_poi);
+	raw_read(chip, buf, chip->oob_poi);
+	return 0;
 }
 
 static int tango_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
@@ -419,7 +416,8 @@ static int tango_read_oob(struct mtd_info *mtd, struct nand_chip *chip,
 			  int page)
 {
 	chip->cmdfunc(mtd, NAND_CMD_READ0, 0, page);
-	return raw_read(chip, NULL, chip->oob_poi);
+	raw_read(chip, NULL, chip->oob_poi);
+	return 0;
 }
 
 static int tango_write_oob(struct mtd_info *mtd, struct nand_chip *chip,
-- 
2.9.0

      parent reply	other threads:[~2016-11-15 10:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-14  9:47 [PATCH] mtd: nand: Support controllers with custom page accessors Marc Gonzalez
2016-11-14 10:11 ` Boris Brezillon
2016-11-14 17:01   ` [PATCH v2 1/2] mtd: nand: Support controllers with custom page Marc Gonzalez
2016-11-14 17:34     ` Boris Brezillon
2016-11-15  9:56       ` [PATCH v3 1/3] " Marc Gonzalez
2016-11-19 18:40         ` Boris Brezillon
2016-11-14 17:06   ` [PATCH v2 2/2] mtd: nand: tango: Enable custom page accessors Marc Gonzalez
2016-11-14 17:38     ` Boris Brezillon
2016-11-15 10:05       ` [PATCH v3 2/3] " Marc Gonzalez
2016-11-15 10:08       ` Marc Gonzalez [this message]

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=582ADE93.4010003@sigmadesigns.com \
    --to=marc_gonzalez@sigmadesigns.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=sf84@laposte.net \
    --cc=slash.tmp@free.fr \
    /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).