Skip to content

Commit

Permalink
mtd: nane: print source of error message
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tormod Volden authored and Artem Bityutskiy committed Feb 4, 2013
1 parent 0c69fb0 commit 54cccc7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/mtd/nand/nand_ecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

/*
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 54cccc7

Please sign in to comment.