From patchwork Sat Feb 1 18:10:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 315921 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DB2802C0090 for ; Sun, 2 Feb 2014 05:11:35 +1100 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W9f2C-0002hg-KG; Sat, 01 Feb 2014 18:11:16 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W9f29-00055B-7n; Sat, 01 Feb 2014 18:11:13 +0000 Received: from mail-we0-x243.google.com ([2a00:1450:400c:c03::243]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W9f1z-00054H-UX for linux-mtd@lists.infradead.org; Sat, 01 Feb 2014 18:11:04 +0000 Received: by mail-we0-f195.google.com with SMTP id t60so362539wes.2 for ; Sat, 01 Feb 2014 10:10:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=6ekrYg8Lp531dSWNak7NCSw3UuASX97CtpXeKNHAR6k=; b=NAJJxxSNmYyhSAisaZ0/7nDCWjIQuTXsOpjBmc66eFHRklVzqEEjZJGP2PjzuRUa8x ECDZQoPUjfTryHaT1AdVplrZ7ZSm0YiJ/gsyOyHvZf0Be7rbQZTtxlaatNi39HmXuXsV 46quIzrODuU/70Uu4C+0Rbxhne8B2JgfNRbvD7Q9GLqqKVd68lP3tVz5AkAnm6O//dKY BYkdk5rrcHc4jHjdAEDcnMISaHgwnG6Gf4ts2SZyqpUy4o1o87QIUx1+dJ4hoDSgbyXc faAeIxopa4kUbSfg4jxucCRkUWh7h+k2jiFj63jD5kVPgT1L1no0v4rvBLgzfSx7/m47 f7qA== X-Received: by 10.180.75.202 with SMTP id e10mr3213919wiw.50.1391278233755; Sat, 01 Feb 2014 10:10:33 -0800 (PST) Received: from localhost.localdomain (cha74-5-78-236-240-82.fbx.proxad.net. [78.236.240.82]) by mx.google.com with ESMTPSA id q5sm8692387wia.2.2014.02.01.10.10.32 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 01 Feb 2014 10:10:32 -0800 (PST) From: Boris BREZILLON To: Brian Norris , David Woodhouse Subject: [PATCH] mtd: nand: fix erronous read_buf call in nand_write_page_raw_syndrome Date: Sat, 1 Feb 2014 19:10:28 +0100 Message-Id: <1391278228-12701-1-git-send-email-b.brezillon.dev@gmail.com> X-Mailer: git-send-email 1.7.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140201_131104_144471_2AB75A25 X-CRM114-Status: GOOD ( 10.65 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (b.brezillon.dev[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Boris BREZILLON , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org read_buf is called in place of write_buf in the nand_write_page_raw_syndrome function. Signed-off-by: Boris BREZILLON --- 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) {