mtd: nan: use dev_err() instead of printk()
cover mtd: nan: use dev_err() instead of printk()
Use dev_err()/dev_warn() instead of printk() to provide a better message to userspace.
Change since v1
- Remove the site-specific OOM messages, per Ezequiel Garcia.
Jingoo Han (4)
mtd: atmel_nand: use dev_err() instead of printk()
mtd: fsmc_nand: use dev_warn() instead of printk()
mtd: orion_nand: use dev_err() instead of printk()
mtd: sharpsl: use dev_err() instead of printk()
--- drivers/mtd/nand/atmel_nand.c | 4 ++-- drivers/mtd/nand/fsmc_nand.c | 8 ++++---- drivers/mtd/nand/orion_nand.c | 2 +- drivers/mtd/nand/sharpsl.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-)
PATCH v2 1/4 mtd: atmel_nand: use dev_err() instead of printk()
Use dev_err() instead of printk() to provide a better message to userspace.
---
Change since v1
- Remove the site-specific OOM messages.
drivers/mtd/nand/atmel_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/nand/atmel_nand.c +2 -2
@@ -2060,14 +2060,14 @@ static int atmel_nand_probe(struct platform_device *pdev) }if (gpio_get_value (host->board.det_pin)) { -printk (KERN_INFO "No SmartMedia card inserted.\n" ); +dev_info (&pdev->dev,"No SmartMedia card inserted.\n" ); res = -ENXIO ; goto err_no_card; } }if (host->board.on_flash_bbt || on_flash_bbt) { -printk (KERN_INFO "atmel_nand: Use On Flash BBT\n" ); +dev_info (&pdev->dev,"Use On Flash BBT\n" ); nand_chip->bbt_options |=NAND_BBT_USE_FLASH ; }
Signature · 1 line
1.7.10.4
Re: [PATCH V2 1/4] mtd: atmel_nand: use dev_err() instead of printk()
Quoted 4 lines · Jingoo Han
Use
dev_err()instead ofprintk()to provide a better message to userspace.Signed-off-by Jingoo Han <[email protected]>
Best Regards,
Josh Wu
Quoted 28 lines
---
Change since v1
- Remove the site-specific OOM messages.drivers/mtd/nand/atmel_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/mtd/nand/atmel_nand.c +2
-2@@ -2060,14 +2060,14 @@ static int atmel_nand_probe(struct platform_device *pdev) }if (gpio_get_value (host->board.det_pin)) { -printk (KERN_INFO "No SmartMedia card inserted.\n" ); +dev_info (&pdev->dev,"No SmartMedia card inserted.\n" ); res = -ENXIO ; goto err_no_card; } }if (host->board.on_flash_bbt || on_flash_bbt) { -printk (KERN_INFO "atmel_nand: Use On Flash BBT\n" ); +dev_info (&pdev->dev,"Use On Flash BBT\n" ); nand_chip->bbt_options |=NAND_BBT_USE_FLASH ; }
PATCH v2 2/4 mtd: fsmc_nand: use dev_warn() instead of printk()
In reply to Jingoo HanUse dev_warn() instead of printk() to provide a better message to userspace.
---
No changes since v1.
drivers/mtd/nand/fsmc_nand.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/mtd/nand/fsmc_nand.c +4 -4
@@ -1104,8 +1104,8 @@ static int __init fsmc_nand_probe(struct platform_device *pdev) host->ecc_place = &fsmc_ecc4_lp_place;break ;default : -printk (KERN_WARNING "No oob scheme defined for " -"oobsize %d\n" , mtd->oobsize); +dev_warn (&pdev->dev,"No oob scheme defined for oobsize %d\n" , + mtd->oobsize);BUG (); } }else {
@@ -1120,8 +1120,8 @@ static int __init fsmc_nand_probe(struct platform_device *pdev) nand->ecc.layout = &fsmc_ecc1_128_layout;break ;default : -printk (KERN_WARNING "No oob scheme defined for " -"oobsize %d\n" , mtd->oobsize); +dev_warn (&pdev->dev,"No oob scheme defined for oobsize %d\n" , + mtd->oobsize);BUG (); } }
Signature · 1 line
1.7.10.4
Re: [PATCH V2 2/4] mtd: fsmc_nand: use dev_warn() instead of printk()
Quoted 4 lines · Jingoo Han
Use
dev_warn()instead ofprintk()to provide a better message to userspace.Signed-off-by Jingoo Han <[email protected]>
Yours,
Linus Walleij
PATCH v2 3/4 mtd: orion_nand: use dev_err() instead of printk()
In reply to Jingoo HanUse dev_err() instead of printk() to provide a better message to userspace.
---
Change since v1
- Remove the site-specific OOM messages.
drivers/mtd/nand/orion_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/orion_nand.c +1 -1
@@ -100,7 +100,7 @@ static int __init orion_nand_probe(struct platform_device *pdev) io_base =ioremap (res->start,resource_size (res));if (!io_base) { -printk (KERN_ERR "orion_nand: ioremap failed\n" ); +dev_err (&pdev->dev,"ioremap failed\n" ); ret = -EIO ; goto no_res; }
Signature · 1 line
1.7.10.4
PATCH v2 4/4 mtd: sharpsl: use dev_err() instead of printk()
In reply to Jingoo HanUse dev_err() instead of printk() to provide a better message to userspace.
---
Change since v1
- Remove the site-specific OOM messages.
drivers/mtd/nand/sharpsl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/sharpsl.c +1 -1
@@ -134,7 +134,7 @@ static int sharpsl_nand_probe(struct platform_device *pdev)/* map physical address */ sharpsl->io =ioremap (r->start,resource_size (r));if (!sharpsl->io) { -printk ("ioremap to access Sharp SL NAND chip failed\n" ); +dev_err (&pdev->dev,"ioremap to access Sharp SL NAND chip failed\n" ); err = -EIO ; goto err_ioremap; }
Signature · 1 line
1.7.10.4
Quoted 11 lines · Jingoo Han
Use dev_err()/dev_warn() instead of
printk()to provide a better message to userspace.Change since v1
- Remove the site-specific OOM messages, per Ezequiel Garcia.Jingoo Han (4)
mtd:atmel_nand: usedev_err()instead ofprintk()
mtd:fsmc_nand: usedev_warn()instead ofprintk()
mtd:orion_nand: usedev_err()instead ofprintk()
mtd: sharpsl: usedev_err()instead ofprintk()
Pushed all 4 to l2-mtd.git. Thanks.
Brian