linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: fix erronous read_buf call in nand_write_page_raw_syndrome
@ 2014-02-01 18:10 Boris BREZILLON
  2014-02-11 18:44 ` Brian Norris
  0 siblings, 1 reply; 2+ messages in thread
From: Boris BREZILLON @ 2014-02-01 18:10 UTC (permalink / raw)
  To: Brian Norris, David Woodhouse; +Cc: linux-mtd, linux-kernel, Boris BREZILLON

read_buf is called in place of write_buf in the
nand_write_page_raw_syndrome function.

Signed-off-by: Boris BREZILLON <b.brezillon.dev@gmail.com>
---
 drivers/mtd/nand/nand_base.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 15069ec..f59a465 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1902,7 +1902,7 @@ static int nand_write_page_raw_syndrome(struct mtd_info *mtd,
 			oob += chip->ecc.prepad;
 		}
 
-		chip->read_buf(mtd, oob, eccbytes);
+		chip->write_buf(mtd, oob, eccbytes);
 		oob += eccbytes;
 
 		if (chip->ecc.postpad) {
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: nand: fix erronous read_buf call in nand_write_page_raw_syndrome
  2014-02-01 18:10 [PATCH] mtd: nand: fix erronous read_buf call in nand_write_page_raw_syndrome Boris BREZILLON
@ 2014-02-11 18:44 ` Brian Norris
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Norris @ 2014-02-11 18:44 UTC (permalink / raw)
  To: Boris BREZILLON; +Cc: David Woodhouse, linux-mtd, linux-kernel

On Sat, Feb 01, 2014 at 07:10:28PM +0100, Boris BREZILLON wrote:
> read_buf is called in place of write_buf in the
> nand_write_page_raw_syndrome function.
> 
> Signed-off-by: Boris BREZILLON <b.brezillon.dev@gmail.com>

Good catch! I guess no one really tests this function. I can understand
that, since it's in the "raw" version (i.e., without ECC), which should
really only be used for special debugging purposes. And many drivers
don't use the defaults for page writes.

Pushed to l2-mtd.git.

Brian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-11 18:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-01 18:10 [PATCH] mtd: nand: fix erronous read_buf call in nand_write_page_raw_syndrome Boris BREZILLON
2014-02-11 18:44 ` Brian Norris

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).