From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: Jingoo Han <jg1.han@samsung.com>
Cc: 'David Woodhouse' <dwmw2@infradead.org>,
'Brian Norris' <computersforpeace@gmail.com>,
linux-mtd@lists.infradead.org, 'Andrew Lunn' <andrew@lunn.ch>
Subject: Re: [PATCH 3/4] mtd: orion_nand: use dev_err() instead of printk()
Date: Sat, 21 Dec 2013 11:22:04 -0300 [thread overview]
Message-ID: <20131221142203.GA2810@localhost> (raw)
In-Reply-To: <001901cefd5c$644dec50$2ce9c4f0$%han@samsung.com>
Hi Jingoo,
Thanks for the cleanup!
I have some extra requests :-)
On Fri, Dec 20, 2013 at 05:20:50PM +0900, Jingoo Han wrote:
[..]
> diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c
> index a393a5b..7cd9aed 100644
> --- a/drivers/mtd/nand/orion_nand.c
> +++ b/drivers/mtd/nand/orion_nand.c
> @@ -87,7 +87,7 @@ static int __init orion_nand_probe(struct platform_device *pdev)
>
> nc = kzalloc(sizeof(struct nand_chip) + sizeof(struct mtd_info), GFP_KERNEL);
> if (!nc) {
> - printk(KERN_ERR "orion_nand: failed to allocate device structure.\n");
> + dev_err(&pdev->dev, "orion_nand: failed to allocate device structure.\n");
Instead of this replacement, can you remove the error message entirely?
It's redundant for a driver to print anything after an allocation error, since an
out-of-memory condition will print quite enough information.
(Google for "Joe Perches OOM" and you'll find lots of patches removing this prints).
> @@ -110,7 +110,7 @@ static int __init orion_nand_probe(struct platform_device *pdev)
> board = devm_kzalloc(&pdev->dev, sizeof(struct orion_nand_data),
> GFP_KERNEL);
> if (!board) {
> - printk(KERN_ERR "orion_nand: failed to allocate board structure.\n");
> + dev_err(&pdev->dev, "orion_nand: failed to allocate board structure.\n");
Ditto.
Thanks!
--
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
next prev parent reply other threads:[~2013-12-21 14:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 8:17 [PATCH 1/4] mtd: atmel_nand: use dev_err() instead of printk() Jingoo Han
2013-12-20 8:18 ` [PATCH 2/4] mtd: fsmc_nand: use dev_warn() " Jingoo Han
2013-12-20 8:59 ` Linus Walleij
2013-12-20 8:20 ` [PATCH 3/4] mtd: orion_nand: use dev_err() " Jingoo Han
2013-12-21 14:22 ` Ezequiel Garcia [this message]
2013-12-26 1:50 ` Jingoo Han
2013-12-20 8:22 ` [PATCH 4/4] mtd: sharpsl: " Jingoo Han
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131221142203.GA2810@localhost \
--to=ezequiel.garcia@free-electrons.com \
--cc=andrew@lunn.ch \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=jg1.han@samsung.com \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox