aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-03-04 15:01:38 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-03-20 09:15:17 -0400
commit374555aeb64f450db04edb8c7c218d763f2a8781 (patch)
tree5367885bf7c8a8e74d2533dbddc4079a3cbcc1d4 /drivers/mtd
parentff4569c752c577c7e71e03c9d59e6ef85ca763c0 (diff)
[MTD] [NAND] fix broken debug messages
Fix incorrect debug messages (*write* not read); someone committed some cut'n'paste bugs.  There might be more, I only noticed these since I was looking for nand_read usage and landed in some very wrong functions. IMO all MTD debugging message framework is goofed, anyway. It uses "DEBUG" in a way that's incompatible with usage most everywhere else in the kernel, and which prevents normal pr_dbg() and dev_dbg() calls from working right. [True. It predates those by a long way, and should probably be updated to use them. dwmw2] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/nand_base.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index d902370df3e0..0793ca39cc88 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1946,7 +1946,7 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to,
1946 } 1946 }
1947 1947
1948 if (unlikely(ops->ooboffs >= len)) { 1948 if (unlikely(ops->ooboffs >= len)) {
1949 DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: " 1949 DEBUG(MTD_DEBUG_LEVEL0, "nand_do_write_oob: "
1950 "Attempt to start write outside oob\n"); 1950 "Attempt to start write outside oob\n");
1951 return -EINVAL; 1951 return -EINVAL;
1952 } 1952 }
@@ -1956,7 +1956,7 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to,
1956 ops->ooboffs + ops->ooblen > 1956 ops->ooboffs + ops->ooblen >
1957 ((mtd->size >> chip->page_shift) - 1957 ((mtd->size >> chip->page_shift) -
1958 (to >> chip->page_shift)) * len)) { 1958 (to >> chip->page_shift)) * len)) {
1959 DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: " 1959 DEBUG(MTD_DEBUG_LEVEL0, "nand_do_write_oob: "
1960 "Attempt write beyond end of device\n"); 1960 "Attempt write beyond end of device\n");
1961 return -EINVAL; 1961 return -EINVAL;
1962 } 1962 }
@@ -2012,8 +2012,8 @@ static int nand_write_oob(struct mtd_info *mtd, loff_t to,
2012 2012
2013 /* Do not allow writes past end of device */ 2013 /* Do not allow writes past end of device */
2014 if (ops->datbuf && (to + ops->len) > mtd->size) { 2014 if (ops->datbuf && (to + ops->len) > mtd->size) {
2015 DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: " 2015 DEBUG(MTD_DEBUG_LEVEL0, "nand_write_oob: "
2016 "Attempt read beyond end of device\n"); 2016 "Attempt write beyond end of device\n");
2017 return -EINVAL; 2017 return -EINVAL;
2018 } 2018 }
2019 2019