Message ID | 1357986867-22396-1-git-send-email-lists.tormod@gmail.com |
---|---|
State | New, archived |
Headers | show |
On Sat, 2013-01-12 at 11:34 +0100, Tormod Volden wrote: > 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> Pushed to l2-mtd.git with a minor amendment (kill the semicolon at the end).
On Thu, Jan 17, 2013 at 2:56 PM, Artem Bityutskiy wrote: > On Sat, 2013-01-12 at 11:34 +0100, Tormod Volden wrote: >> 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> > > Pushed to l2-mtd.git with a minor amendment (kill the semicolon at the > end). Thanks! I guess the intention of the colon at the end was that the calling function would fill in more details, but if this does not happen it is better without. In that case it should even be a \n at the end though... Tormod
On Thu, 2013-01-17 at 23:58 +0100, Tormod Volden wrote: > Thanks! I guess the intention of the colon at the end was that the > calling function would fill in more details, but if this does not > happen it is better without. In that case it should even be a \n at > the end though... Just added the "\n" character.
diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c index b7cfe0d..526fa3b 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 error : ", __func__); return -1; } EXPORT_SYMBOL(__nand_correct_data);