diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2012-08-02 09:06:47 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-09-29 09:59:28 -0400 |
commit | 13e859745cf8cf0e6602759b1ef2abcb9ced7991 (patch) | |
tree | 3b5543f7bed728c20bb201a0c977c504bb19c892 /drivers/mtd/nand/s3c2410.c | |
parent | 513d57e1db53870cdc11e60df77c57c8b3897fdf (diff) |
mtd: use %*ph[CN] to dump small buffers
There is new format specified that helps to dump small buffers. It makes the
code simpler and nicer.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Jiandong Zheng <jdzheng@broadcom.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/s3c2410.c')
-rw-r--r-- | drivers/mtd/nand/s3c2410.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index e71f7a951bf0..8ae9399fb4c8 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c | |||
@@ -457,10 +457,8 @@ static int s3c2410_nand_correct_data(struct mtd_info *mtd, u_char *dat, | |||
457 | diff1 = read_ecc[1] ^ calc_ecc[1]; | 457 | diff1 = read_ecc[1] ^ calc_ecc[1]; |
458 | diff2 = read_ecc[2] ^ calc_ecc[2]; | 458 | diff2 = read_ecc[2] ^ calc_ecc[2]; |
459 | 459 | ||
460 | pr_debug("%s: rd %02x%02x%02x calc %02x%02x%02x diff %02x%02x%02x\n", | 460 | pr_debug("%s: rd %*phN calc %*phN diff %02x%02x%02x\n", |
461 | __func__, | 461 | __func__, 3, read_ecc, 3, calc_ecc, |
462 | read_ecc[0], read_ecc[1], read_ecc[2], | ||
463 | calc_ecc[0], calc_ecc[1], calc_ecc[2], | ||
464 | diff0, diff1, diff2); | 462 | diff0, diff1, diff2); |
465 | 463 | ||
466 | if (diff0 == 0 && diff1 == 0 && diff2 == 0) | 464 | if (diff0 == 0 && diff1 == 0 && diff2 == 0) |
@@ -562,8 +560,7 @@ static int s3c2410_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, | |||
562 | ecc_code[1] = readb(info->regs + S3C2410_NFECC + 1); | 560 | ecc_code[1] = readb(info->regs + S3C2410_NFECC + 1); |
563 | ecc_code[2] = readb(info->regs + S3C2410_NFECC + 2); | 561 | ecc_code[2] = readb(info->regs + S3C2410_NFECC + 2); |
564 | 562 | ||
565 | pr_debug("%s: returning ecc %02x%02x%02x\n", __func__, | 563 | pr_debug("%s: returning ecc %*phN\n", __func__, 3, ecc_code); |
566 | ecc_code[0], ecc_code[1], ecc_code[2]); | ||
567 | 564 | ||
568 | return 0; | 565 | return 0; |
569 | } | 566 | } |
@@ -578,8 +575,7 @@ static int s3c2412_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, | |||
578 | ecc_code[1] = ecc >> 8; | 575 | ecc_code[1] = ecc >> 8; |
579 | ecc_code[2] = ecc >> 16; | 576 | ecc_code[2] = ecc >> 16; |
580 | 577 | ||
581 | pr_debug("calculate_ecc: returning ecc %02x,%02x,%02x\n", | 578 | pr_debug("%s: returning ecc %*phN\n", __func__, 3, ecc_code); |
582 | ecc_code[0], ecc_code[1], ecc_code[2]); | ||
583 | 579 | ||
584 | return 0; | 580 | return 0; |
585 | } | 581 | } |