[MTD] [NAND] fix broken debug messages
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Mar 20 14:59:21 EDT 2009
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=374555aeb64f450db04edb8c7c218d763f2a8781
Commit: 374555aeb64f450db04edb8c7c218d763f2a8781
Parent: ff4569c752c577c7e71e03c9d59e6ef85ca763c0
Author: David Brownell <dbrownell at users.sourceforge.net>
AuthorDate: Wed Mar 4 12:01:38 2009 -0800
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Mar 20 13:15:17 2009 +0000
[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 at users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/nand/nand_base.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index d902370..0793ca3 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,
}
if (unlikely(ops->ooboffs >= len)) {
- DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
+ DEBUG(MTD_DEBUG_LEVEL0, "nand_do_write_oob: "
"Attempt to start write outside oob\n");
return -EINVAL;
}
@@ -1956,7 +1956,7 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to,
ops->ooboffs + ops->ooblen >
((mtd->size >> chip->page_shift) -
(to >> chip->page_shift)) * len)) {
- DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
+ DEBUG(MTD_DEBUG_LEVEL0, "nand_do_write_oob: "
"Attempt write beyond end of device\n");
return -EINVAL;
}
@@ -2012,8 +2012,8 @@ static int nand_write_oob(struct mtd_info *mtd, loff_t to,
/* Do not allow writes past end of device */
if (ops->datbuf && (to + ops->len) > mtd->size) {
- DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
- "Attempt read beyond end of device\n");
+ DEBUG(MTD_DEBUG_LEVEL0, "nand_write_oob: "
+ "Attempt write beyond end of device\n");
return -EINVAL;
}
More information about the linux-mtd-cvs
mailing list