linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: fix one typo in the comments
@ 2011-02-25  5:06 Jason Liu
  2011-02-25 12:43 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Liu @ 2011-02-25  5:06 UTC (permalink / raw)
  To: linux-arm-kernel

In the function nand_do_write_oob, the comments
has one typo, this patch fix it.

- /* Do not allow reads past end of device */
+ /* Do not allow write past end of device */
if (unlikely(to >= mtd->size ||
	     ops->ooboffs + ops->ooblen >
		((mtd->size >> chip->page_shift) -
		 (to >> chip->page_shift)) * len)) {
	DEBUG(MTD_DEBUG_LEVEL0, "%s: Attempt write beyond "
			"end of device\n", __func__);
	return -EINVAL;
}

Signed-off-by: Jason Liu <r64343@freescale.com>
---
 drivers/mtd/nand/nand_base.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index a9c6ce7..da76040 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2377,7 +2377,7 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to,
 		return -EINVAL;
 	}
 
-	/* Do not allow reads past end of device */
+	/* Do not allow write past end of device */
 	if (unlikely(to >= mtd->size ||
 		     ops->ooboffs + ops->ooblen >
 			((mtd->size >> chip->page_shift) -
-- 
1.7.0.4

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

end of thread, other threads:[~2011-02-25 12:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-25  5:06 [PATCH] mtd: nand: fix one typo in the comments Jason Liu
2011-02-25 12:43 ` Artem Bityutskiy

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