linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mtd: nand: generalized error messages with __func__
@ 2011-05-25 21:59 Brian Norris
  2011-05-25 21:59 ` [PATCH 2/2] mtd: nand: multi-line comment style fixups Brian Norris
  2011-05-26  5:14 ` [PATCH 1/2] mtd: nand: generalized error messages with __func__ Igor Grinberg
  0 siblings, 2 replies; 13+ messages in thread
From: Brian Norris @ 2011-05-25 21:59 UTC (permalink / raw)
  To: linux-mtd; +Cc: Brian Norris, David Woodhouse, Artem Bityutskiy

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

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-06-07 22:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-25 21:59 [PATCH 1/2] mtd: nand: generalized error messages with __func__ Brian Norris
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

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).