From patchwork Thu Jun 9 06:59:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Bityutskiy X-Patchwork-Id: 99628 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 37FBCB6FDD for ; Thu, 9 Jun 2011 17:04:35 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QUZHp-00067v-D2; Thu, 09 Jun 2011 07:04:13 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QUZHo-00017Y-Uy; Thu, 09 Jun 2011 07:04:12 +0000 Received: from mail-ey0-f177.google.com ([209.85.215.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QUZHl-00016t-Bs for linux-mtd@lists.infradead.org; Thu, 09 Jun 2011 07:04:10 +0000 Received: by eyh6 with SMTP id 6so536945eyh.36 for ; Thu, 09 Jun 2011 00:04:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:reply-to:to:cc:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=AFgXG6EtdtXZZ9X1SNzRlUQPP9pLv3IxlaIsld7s5Js=; b=CHNbg89l2RAqCCNXmHtQUeipv8ICQw+Xxm/ltaFS99j/UzmBVM0j7WPlLR7r56kXyg wjMoSQVe1Nl0N94SIMCiV/XVUWci22VAVKiAlD9DC+vmzZLPlN1IoKEGY1TaM0E3IdJC VuVDvc9uroxZVGZBKpwZd9js3LTNGspNq0BKY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:reply-to:to:cc:in-reply-to:references:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; b=d7rWWGNeHy1ck0Fw3cLLIypIYzgYzsbDZx+sjljmuRt/3nMU+yAAXtfK6reoT/FF2j C9M2M6byRbG85FXVnbbz9nOx+PU2dBJw3LwtSI0oiSXq68rRc0bBhNPrV9juBKbHWva2 lafZcppIJWn/LSDA/AI+bBWEtPo+Nb84HZOqU= Received: by 10.14.37.73 with SMTP id x49mr157501eea.164.1307603045897; Thu, 09 Jun 2011 00:04:05 -0700 (PDT) Received: from ?IPv6:::1? (shutemov.name [188.40.19.243]) by mx.google.com with ESMTPS id s11sm1172099eef.15.2011.06.09.00.04.04 (version=SSLv3 cipher=OTHER); Thu, 09 Jun 2011 00:04:05 -0700 (PDT) Subject: Re: [PATCH v2 2/4] mtd: nand: convert printk() to pr_*() From: Artem Bityutskiy To: Brian Norris In-Reply-To: <1307602388.7374.13.camel@localhost> References: <1307544227.31223.115.camel@localhost> <1307557519-31269-1-git-send-email-computersforpeace@gmail.com> <1307602388.7374.13.camel@localhost> Date: Thu, 09 Jun 2011 09:59:48 +0300 Message-ID: <1307602788.7374.15.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 (2.32.2-1.fc14) X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110609_030409_697369_3140C53C X-CRM114-Status: GOOD ( 23.26 ) X-Spam-Score: 1.4 (+) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (1.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is freemail (dedekind1[at]gmail.com) 2.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (dedekind1[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.177 listed in list.dnswl.org] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 RFC_ABUSE_POST Both abuse and postmaster missing on sender domain Cc: David Woodhouse , linux-mtd@lists.infradead.org, Igor Grinberg X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: dedekind1@gmail.com 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 On Thu, 2011-06-09 at 09:53 +0300, Artem Bityutskiy wrote: > On Wed, 2011-06-08 at 11:25 -0700, Brian Norris wrote: > > - printk(KERN_DEBUG "Bad block table written to 0x%012llx, version " > > + pr_debug("Bad block table written to 0x%012llx, version " > > "0x%02X\n", (unsigned long long)to, td->version[chip]); > > Hmm, the side effect of this change is this message will disappear if > DEBUG is undefined / dynamic debugging is disabled. > > So I think we need to change all these pr_debug to pr_info, because this > is really just info. I've pushed the following patch on top, is this OK with you? From b40c110df5943149892f9d6b2973a03f90e78e6c Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Thu, 9 Jun 2011 10:03:26 +0300 Subject: [PATCH] mtd: nand_bbt: turn pr_debug into pr_info In the previous patch we changed all "prink(KERN_DEBUG" messages with "pr_debug()", which means that the messages will now disappear unless they are explicitly enabled with DEBUG macro and dynamic debugging means. But if you look at those messages, they are information messages like "bad block table found or re-written", so we do want to see them. This patch turns those messages into 'pr_info()'. Signed-off-by: Artem Bityutskiy --- drivers/mtd/nand/nand_bbt.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index a1e51dc..e3b0d62 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c @@ -219,14 +219,14 @@ static int read_bbt(struct mtd_info *mtd, uint8_t *buf, int page, int num, if (tmp == msk) continue; if (reserved_block_code && (tmp == reserved_block_code)) { - pr_debug("nand_read_bbt: reserved block at 0x%012llx\n", - (loff_t)((offs << 2) + (act >> 1)) << this->bbt_erase_shift); + pr_info("nand_read_bbt: reserved block at 0x%012llx\n", + (loff_t)((offs << 2) + (act >> 1)) << this->bbt_erase_shift); this->bbt[offs + (act >> 3)] |= 0x2 << (act & 0x06); mtd->ecc_stats.bbtblocks++; continue; } - pr_debug("nand_read_bbt: bad block at 0x%012llx\n", - (loff_t)((offs << 2) + (act >> 1)) << this->bbt_erase_shift); + pr_info("nand_read_bbt: bad block at 0x%012llx\n", + (loff_t)((offs << 2) + (act >> 1)) << this->bbt_erase_shift); /* Factory marked bad or worn out? */ if (tmp == 0) this->bbt[offs + (act >> 3)] |= 0x3 << (act & 0x06); @@ -379,8 +379,8 @@ static int read_abs_bbts(struct mtd_info *mtd, uint8_t *buf, scan_read_raw(mtd, buf, (loff_t)td->pages[0] << this->page_shift, mtd->writesize, td); td->version[0] = buf[bbt_get_ver_offs(mtd, td)]; - pr_debug("Bad block table at page %d, version 0x%02X\n", - td->pages[0], td->version[0]); + pr_info("Bad block table at page %d, version 0x%02X\n", + td->pages[0], td->version[0]); } /* Read the mirror version, if available */ @@ -388,8 +388,8 @@ static int read_abs_bbts(struct mtd_info *mtd, uint8_t *buf, scan_read_raw(mtd, buf, (loff_t)md->pages[0] << this->page_shift, mtd->writesize, td); md->version[0] = buf[bbt_get_ver_offs(mtd, md)]; - pr_debug("Bad block table at page %d, version 0x%02X\n", - md->pages[0], md->version[0]); + pr_info("Bad block table at page %d, version 0x%02X\n", + md->pages[0], md->version[0]); } return 1; } @@ -492,7 +492,7 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, } else { if (chip >= this->numchips) { pr_warn("create_bbt(): chipnr (%d) > available chips (%d)\n", - chip + 1, this->numchips); + chip + 1, this->numchips); return -EINVAL; } numblocks = this->chipsize >> (this->bbt_erase_shift - 1); @@ -605,8 +605,8 @@ static int search_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr if (td->pages[i] == -1) pr_warn("Bad block table not found for chip %d\n", i); else - pr_debug("Bad block table found at page %d, version " - "0x%02X\n", td->pages[i], td->version[i]); + pr_info("Bad block table found at page %d, version " + "0x%02X\n", td->pages[i], td->version[i]); } return 0; } @@ -834,8 +834,8 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf, if (res < 0) goto outerr; - pr_debug("Bad block table written to 0x%012llx, version 0x%02X\n", - (unsigned long long)to, td->version[chip]); + pr_info("Bad block table written to 0x%012llx, version 0x%02X\n", + (unsigned long long)to, td->version[chip]); /* Mark it as used */ td->pages[chip] = page;