diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-10-18 00:10:48 +0900 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-10-23 14:07:26 -0400 |
commit | 166cae20dd797dcb25fc550269792f15704d9c58 (patch) | |
tree | 9d3bca5af6ead142c62868803710c9502e533c36 /drivers/mtd/nand/atmel_nand.c | |
parent | ce0dea889a01d06bdc2d845fd03e90bcf8b49fec (diff) |
mtd: replace MTDDEBUG() with pr_debug()
In old days, the MTD subsystem in Linux had debug facility like
DEBUG(MTD_DEBUG_LEVEL1, ...).
They were all replaced with pr_debug() until Linux 3.2. See Linux
commit 289c05222172 ("mtd: replace DEBUG() with pr_debug()").
U-Boot still uses similar macros. Covert all of them for easier sync.
Done with the help of Coccinelle.
The semantic patch I used is as follows:
// <smpl>
@@
expression e1, e2;
@@
-MTDDEBUG(e1, e2)
+pr_debug(e2)
@@
expression e1, e2;
@@
-MTDDEBUG(e1, e2,
+pr_debug(e2,
...)
// </smpl>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'drivers/mtd/nand/atmel_nand.c')
-rw-r--r-- | drivers/mtd/nand/atmel_nand.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 7c10bfedc6d..65dd83eced5 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c @@ -702,7 +702,7 @@ static int pmecc_choose_ecc(struct atmel_nand_host *host, if (chip->onfi_version) { *cap = chip->ecc_strength_ds; *sector_size = chip->ecc_step_ds; - MTDDEBUG(MTD_DEBUG_LEVEL1, "ONFI params, minimum required ECC: %d bits in %d bytes\n", + pr_debug("ONFI params, minimum required ECC: %d bits in %d bytes\n", *cap, *sector_size); } @@ -863,9 +863,8 @@ static int atmel_pmecc_nand_init_params(struct nand_chip *nand, host->pmecc_index_table_offset = ATMEL_PMECC_INDEX_OFFSET_1024; #endif - MTDDEBUG(MTD_DEBUG_LEVEL1, - "Initialize PMECC params, cap: %d, sector: %d\n", - cap, sector_size); + pr_debug("Initialize PMECC params, cap: %d, sector: %d\n", + cap, sector_size); host->pmecc = (struct pmecc_regs __iomem *) ATMEL_BASE_PMECC; host->pmerrloc = (struct pmecc_errloc_regs __iomem *) |