Patchwork mtd: nand: fix one typo in the comments

login
register
mail settings
Submitter Liu Hui-R64343
Date Feb. 25, 2011, 5:06 a.m.
Message ID <1298610378-3105-1-git-send-email-r64343@freescale.com>
Download mbox | patch
Permalink /patch/84511/
State New
Headers show

Comments

Liu Hui-R64343 - Feb. 25, 2011, 5:06 a.m.
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(-)
Artem Bityutskiy - Feb. 25, 2011, 12:43 p.m.
On Fri, 2011-02-25 at 13:06 +0800, Jason Liu wrote:
> 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>

Oh, please, do not copy the patch into the commit message! It is enough
to say that you fix a typo in a commentary.

But I've amended the commit message and pushed the patch to my
l2-mtd-2.6.git tree, thanks!

Patch

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