From 54cccc70946c7fc15eb9a930935ccba1f7e4599e Mon Sep 17 00:00:00 2001 From: Tormod Volden Date: Sat, 12 Jan 2013 11:34:27 +0100 Subject: [PATCH] mtd: nane: print source of error message 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 : Artem: amended the patch a bit Signed-off-by: Tormod Volden --- drivers/mtd/nand/nand_ecc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c index b7cfe0d37121..053c9a2d47c3 100644 --- a/drivers/mtd/nand/nand_ecc.c +++ b/drivers/mtd/nand/nand_ecc.c @@ -55,8 +55,7 @@ struct mtd_info; #define MODULE_AUTHOR(x) /* x */ #define MODULE_DESCRIPTION(x) /* x */ -#define printk printf -#define KERN_ERR "" +#define pr_err printf #endif /* @@ -507,7 +506,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 : "); + pr_err("%s: uncorrectable ECC error", __func__); return -1; } EXPORT_SYMBOL(__nand_correct_data); -- 2.39.5