From: "Brian Norris" <computersforpeace@gmail.com>
To: linux-mtd@lists.infradead.org
Cc: Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
Artem Bityutskiy <dedekind1@gmail.com>
Subject: [PATCH 1/2] mtd: nand: generalized error messages with __func__
Date: Wed, 25 May 2011 14:59:00 -0700 [thread overview]
Message-ID: <1306360741-12770-1-git-send-email-computersforpeace@gmail.com> (raw)
These simple printk error messages can be a little simpler to maintain
when they use the __func__ identifier.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
drivers/mtd/nand/nand_bbt.c | 8 ++++----
drivers/mtd/nand/rtc_from4.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index ccbeaa1..7936a6c 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -1164,7 +1164,7 @@ int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd)
/* Allocate memory (2bit per block) and clear the memory bad block table */
this->bbt = kzalloc(len, GFP_KERNEL);
if (!this->bbt) {
- printk(KERN_ERR "nand_scan_bbt: Out of memory\n");
+ printk(KERN_ERR "%s: Out of memory\n", __func__);
return -ENOMEM;
}
@@ -1187,7 +1187,7 @@ int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd)
len += (len >> this->page_shift) * mtd->oobsize;
buf = vmalloc(len);
if (!buf) {
- printk(KERN_ERR "nand_bbt: Out of memory\n");
+ printk(KERN_ERR "%s: Out of memory\n", __func__);
kfree(this->bbt);
this->bbt = NULL;
return -ENOMEM;
@@ -1237,7 +1237,7 @@ int nand_update_bbt(struct mtd_info *mtd, loff_t offs)
len += (len >> this->page_shift) * mtd->oobsize;
buf = kmalloc(len, GFP_KERNEL);
if (!buf) {
- printk(KERN_ERR "nand_update_bbt: Out of memory\n");
+ printk(KERN_ERR "%s: Out of memory\n", __func__);
return -ENOMEM;
}
@@ -1351,7 +1351,7 @@ static int nand_create_default_bbt_descr(struct nand_chip *this)
}
bd = kzalloc(sizeof(*bd), GFP_KERNEL);
if (!bd) {
- printk(KERN_ERR "nand_create_default_bbt_descr: Out of memory\n");
+ printk(KERN_ERR "%s: Out of memory\n", __func__);
return -ENOMEM;
}
bd->options = this->options & BBT_SCAN_OPTIONS;
diff --git a/drivers/mtd/nand/rtc_from4.c b/drivers/mtd/nand/rtc_from4.c
index c9f9127..7e02c94 100644
--- a/drivers/mtd/nand/rtc_from4.c
+++ b/drivers/mtd/nand/rtc_from4.c
@@ -444,7 +444,7 @@ static int rtc_from4_errstat(struct mtd_info *mtd, struct nand_chip *this,
len = mtd->writesize;
buf = kmalloc(len, GFP_KERNEL);
if (!buf) {
- printk(KERN_ERR "rtc_from4_errstat: Out of memory!\n");
+ printk(KERN_ERR "%s: Out of memory!\n", __func__);
er_stat = 1;
goto out;
}
--
1.7.0.4
next reply other threads:[~2011-05-25 22:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-25 21:59 Brian Norris [this message]
2011-05-25 21:59 ` [PATCH 2/2] mtd: nand: multi-line comment style fixups Brian Norris
2011-06-06 14:26 ` Artem Bityutskiy
2011-06-06 15:21 ` Brian Norris
2011-05-26 5:14 ` [PATCH 1/2] mtd: nand: generalized error messages with __func__ Igor Grinberg
2011-05-26 5:16 ` Artem Bityutskiy
2011-05-31 18:52 ` Brian Norris
2011-05-31 20:19 ` Mike Frysinger
2011-06-01 10:30 ` Artem Bityutskiy
2011-06-01 18:37 ` Brian Norris
2011-06-03 15:35 ` Artem Bityutskiy
2011-06-07 7:26 ` Igor Grinberg
2011-06-07 22:57 ` Brian Norris
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=1306360741-12770-1-git-send-email-computersforpeace@gmail.com \
--to=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--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).