Skip to content

Commit 54cccc7

Browse files
tormodvoldendedekind
authored andcommitted
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 <[email protected]>
1 parent 0c69fb0 commit 54cccc7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/mtd/nand/nand_ecc.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ struct mtd_info;
5555
#define MODULE_AUTHOR(x) /* x */
5656
#define MODULE_DESCRIPTION(x) /* x */
5757

58-
#define printk printf
59-
#define KERN_ERR ""
58+
#define pr_err printf
6059
#endif
6160

6261
/*
@@ -507,7 +506,7 @@ int __nand_correct_data(unsigned char *buf,
507506
if ((bitsperbyte[b0] + bitsperbyte[b1] + bitsperbyte[b2]) == 1)
508507
return 1; /* error in ECC data; no action needed */
509508

510-
printk(KERN_ERR "uncorrectable error : ");
509+
pr_err("%s: uncorrectable ECC error", __func__);
511510
return -1;
512511
}
513512
EXPORT_SYMBOL(__nand_correct_data);

0 commit comments

Comments
 (0)