public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: print source of "uncorrectable error" message
@ 2013-01-11 23:43 Tormod Volden
  2013-01-12  9:01 ` Vikram Narayanan
  0 siblings, 1 reply; 6+ messages in thread
From: Tormod Volden @ 2013-01-11 23:43 UTC (permalink / raw)
  To: linux-mtd

From: Tormod Volden <debian.tormod@gmail.com>

Add the function name to the error message.

These messages are not very helpful:

[183356.176682] uncorrectable error :
[183356.180273] uncorrectable error :
[183356.184194] uncorrectable error :
[183356.187773] uncorrectable error :
[183356.191280] uncorrectable error :

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
---

Not sure if above messages come from this code. I also believe there must be
a better way, advice welcome. Maybe we need to make sure all possible callers
print additional information if -1 is returned.

But this small change should be better than nothing, meanwhile.

Regards,
Tormod


 drivers/mtd/nand/nand_ecc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c
index b7cfe0d..cee06e9 100644
--- a/drivers/mtd/nand/nand_ecc.c
+++ b/drivers/mtd/nand/nand_ecc.c
@@ -507,7 +507,7 @@ int __nand_correct_data(unsigned char *buf,
 	if ((bitsperbyte[b0] + bitsperbyte[b1] + bitsperbyte[b2]) == 1)
 		return 1;	/* error in ECC data; no action needed */
 
-	printk(KERN_ERR "uncorrectable error : ");
+	printk(KERN_ERR "__nand_correct_data: uncorrectable error : ");
 	return -1;
 }
 EXPORT_SYMBOL(__nand_correct_data);
-- 
1.7.9.5

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

end of thread, other threads:[~2013-01-18 10:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-11 23:43 [PATCH] mtd: nand: print source of "uncorrectable error" message Tormod Volden
2013-01-12  9:01 ` Vikram Narayanan
2013-01-12 10:34   ` [PATCH v2] mtd/nand: Print source of error message Tormod Volden
2013-01-17 13:56     ` Artem Bityutskiy
2013-01-17 22:58       ` Tormod Volden
2013-01-18 10:18         ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox