From: "Brian Norris" <computersforpeace@gmail.com>
To: "Artem Bityutskiy" <dedekind1@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
linux-mtd@lists.infradead.org,
Igor Grinberg <grinberg@compulab.co.il>
Subject: [PATCH 4/4] mtd: nand: define pr_fmt() to include __func__ in debug output
Date: Tue, 7 Jun 2011 16:01:57 -0700 [thread overview]
Message-ID: <1307487717-25402-5-git-send-email-computersforpeace@gmail.com> (raw)
In-Reply-To: <1307487717-25402-1-git-send-email-computersforpeace@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
drivers/mtd/nand/nand_bbt.c | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 4d18098..e2c9948 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -59,6 +59,8 @@
*
*/
+#define pr_fmt(fmt) "%s: " fmt, __func__
+
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/mtd/mtd.h>
@@ -205,10 +207,10 @@ static int read_bbt(struct mtd_info *mtd, uint8_t *buf, int page, int num,
res = mtd->read(mtd, from, len, &retlen, buf);
if (res < 0) {
if (retlen != len) {
- pr_info("nand_bbt: Error reading bad block table\n");
+ pr_info("Error reading bad block table\n");
return res;
}
- pr_warn("nand_bbt: ECC error while reading bad block table\n");
+ pr_warn("ECC error while reading bad block table\n");
}
/* Analyse data */
@@ -219,13 +221,13 @@ 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",
+ pr_debug("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",
+ pr_debug("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)
@@ -491,7 +493,7 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf,
from = 0;
} else {
if (chip >= this->numchips) {
- pr_warn("create_bbt(): chipnr (%d) > available chips (%d)\n",
+ pr_warn("chipnr (%d) > available chips (%d)\n",
chip + 1, this->numchips);
return -EINVAL;
}
@@ -754,14 +756,13 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf,
res = mtd->read(mtd, to, len, &retlen, buf);
if (res < 0) {
if (retlen != len) {
- pr_info("nand_bbt: Error "
+ pr_info("Error "
"reading block for writing "
"the bad block table\n");
return res;
}
- pr_warn("nand_bbt: ECC error "
- "while reading block for writing "
- "bad block table\n");
+ pr_warn("ECC error while reading block for "
+ "writing bad block table\n");
}
/* Read oob data */
ops.ooblen = (len >> this->page_shift) * mtd->oobsize;
@@ -845,7 +846,7 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf,
return 0;
outerr:
- pr_warning("nand_bbt: Error while writing bad block table %d\n", res);
+ pr_warning("Error while writing bad block table %d\n", res);
return res;
}
@@ -1125,7 +1126,7 @@ int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd)
*/
if (!td) {
if ((res = nand_memory_bbt(mtd, bd))) {
- pr_err("nand_bbt: Can't scan flash and build the RAM-based BBT\n");
+ pr_err("Can't scan flash and build the RAM-based BBT\n");
kfree(this->bbt);
this->bbt = NULL;
}
--
1.7.0.4
next prev parent reply other threads:[~2011-06-07 23:02 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 23:01 [PATCH 0/4] debug, printk cleanup Brian Norris
2011-06-07 23:01 ` [PATCH 1/4] mtd: remove printk's for [kv][mz]alloc failures Brian Norris
2011-06-08 14:27 ` Artem Bityutskiy
2011-06-07 23:01 ` [PATCH 2/4] mtd: nand: convert printk() to pr_*() Brian Norris
2011-06-08 14:43 ` Artem Bityutskiy
2011-06-08 18:25 ` [PATCH v2 " Brian Norris
2011-06-09 6:40 ` Artem Bityutskiy
2011-06-09 6:53 ` Artem Bityutskiy
2011-06-09 6:59 ` Artem Bityutskiy
2011-06-09 7:44 ` Artem Bityutskiy
2011-06-09 16:00 ` Brian Norris
2011-06-09 16:03 ` Artem Bityutskiy
2011-06-13 18:24 ` Brian Norris
2011-06-22 4:40 ` Artem Bityutskiy
2011-06-22 9:12 ` Dmitry Eremin-Solenikov
2011-07-06 18:51 ` Brian Norris
2011-07-06 19:12 ` Brian Norris
2011-07-06 19:47 ` Dmitry Eremin-Solenikov
2011-07-06 19:59 ` Brian Norris
2011-07-07 6:58 ` Artem Bityutskiy
2011-07-07 17:00 ` Brian Norris
2011-07-07 19:56 ` Artem Bityutskiy
2011-07-08 16:06 ` Brian Norris
2011-07-20 3:59 ` Artem Bityutskiy
2011-07-07 7:01 ` Artem Bityutskiy
2011-07-07 17:01 ` Brian Norris
2011-06-09 8:13 ` Artem Bityutskiy
2011-06-09 16:22 ` Brian Norris
2011-06-10 18:25 ` Brian Norris
2011-06-07 23:01 ` [PATCH 3/4] mtd: nand: replace DEBUG() with dev_dbg() Brian Norris
2011-06-08 14:44 ` Artem Bityutskiy
2011-06-08 18:27 ` [PATCH v2 " Brian Norris
2011-06-09 6:46 ` Artem Bityutskiy
2011-06-07 23:01 ` Brian Norris [this message]
2011-06-08 14:47 ` [PATCH 4/4] mtd: nand: define pr_fmt() to include __func__ in debug output Artem Bityutskiy
2011-06-08 18:23 ` Brian Norris
2011-06-08 18:28 ` [PATCH v2 " Brian Norris
2011-06-09 7:10 ` Artem Bityutskiy
2011-06-08 19:03 ` [PATCH " Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1307487717-25402-5-git-send-email-computersforpeace@gmail.com \
--to=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=grinberg@compulab.co.il \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).