From patchwork Tue Feb 24 23:10:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Brownell X-Patchwork-Id: 23650 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 34F57DDDA2 for ; Wed, 25 Feb 2009 12:18:19 +1100 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1Lc8K0-00050t-TA; Wed, 25 Feb 2009 01:12:24 +0000 Received: from smtp127.sbc.mail.sp1.yahoo.com ([69.147.65.186]) by bombadil.infradead.org with smtp (Exim 4.69 #1 (Red Hat Linux)) id 1Lc8Jw-00050N-Ka for linux-mtd@lists.infradead.org; Wed, 25 Feb 2009 01:12:23 +0000 Received: (qmail 97605 invoked from network); 25 Feb 2009 01:12:18 -0000 Received: from unknown (HELO pogo) (david-b@69.226.224.20 with plain) by smtp127.sbc.mail.sp1.yahoo.com with SMTP; 25 Feb 2009 01:12:18 -0000 X-YMail-OSG: z2bPnZMVM1lShpSwssCJ6VxsdHEZRTnta4rcm9Tr5hgo2cJWzaFdTGtPkEBjgwm.YnVzwk4Lb4fhu.ZmWcBZQv6Bgi0CRL6y0qvU7SybyFFM2rz0OYualgud4I5lE2ET0Q4UYSvSX6swRt6LXy0S1kDbYd5ZM9IqvjCml5Nm2SlVijX97tvVMzeTLOLdKcnMxg-- X-Yahoo-Newman-Property: ymail-3 To: Linux MTD Subject: [patch/RESEND 2.6.29-rc3] NAND: =?iso-8859-1?q?=A0fix_broken_debug_messages?= (v2) Content-Disposition: inline From: David Brownell Date: Tue, 24 Feb 2009 15:10:24 -0800 MIME-Version: 1.0 Message-Id: <200902241510.24993.david-b@pacbell.net> X-Spam-Score: 0.0 (/) Cc: lkml X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: dbrownell@users.sourceforge.net List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: David Brownell 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. Signed-off-by: David Brownell --- Fix a goofed string. drivers/mtd/nand/nand_base.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -1948,7 +1948,7 @@ static int nand_do_write_oob(struct mtd_ } 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; } @@ -1958,7 +1958,7 @@ static int nand_do_write_oob(struct mtd_ 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; } @@ -2014,8 +2014,8 @@ static int nand_write_oob(struct mtd_inf /* 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; }