diff options
author | Tormod Volden <debian.tormod@gmail.com> | 2013-01-12 05:34:27 -0500 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2013-02-04 02:27:19 -0500 |
commit | 54cccc70946c7fc15eb9a930935ccba1f7e4599e (patch) | |
tree | 898f45cbdaa348852b655dbf80a337bbb87b435b /drivers/mtd/nand | |
parent | 0c69fb037a6bb1faf06ea776872da54a6705c154 (diff) |
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 <debian.tormod@gmail.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/nand_ecc.c | 5 |
1 files 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; | |||
55 | #define MODULE_AUTHOR(x) /* x */ | 55 | #define MODULE_AUTHOR(x) /* x */ |
56 | #define MODULE_DESCRIPTION(x) /* x */ | 56 | #define MODULE_DESCRIPTION(x) /* x */ |
57 | 57 | ||
58 | #define printk printf | 58 | #define pr_err printf |
59 | #define KERN_ERR "" | ||
60 | #endif | 59 | #endif |
61 | 60 | ||
62 | /* | 61 | /* |
@@ -507,7 +506,7 @@ int __nand_correct_data(unsigned char *buf, | |||
507 | if ((bitsperbyte[b0] + bitsperbyte[b1] + bitsperbyte[b2]) == 1) | 506 | if ((bitsperbyte[b0] + bitsperbyte[b1] + bitsperbyte[b2]) == 1) |
508 | return 1; /* error in ECC data; no action needed */ | 507 | return 1; /* error in ECC data; no action needed */ |
509 | 508 | ||
510 | printk(KERN_ERR "uncorrectable error : "); | 509 | pr_err("%s: uncorrectable ECC error", __func__); |
511 | return -1; | 510 | return -1; |
512 | } | 511 | } |
513 | EXPORT_SYMBOL(__nand_correct_data); | 512 | EXPORT_SYMBOL(__nand_correct_data); |