From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: Tanya Brokhman <tlinder@codeaurora.org>
Cc: dedekind1@gmail.com, Richard Weinberger <richard@nod.at>,
open list <linux-kernel@vger.kernel.org>,
linux-mtd@lists.infradead.org, linux-arm-msm@vger.kernel.org,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities
Date: Tue, 14 Oct 2014 11:39:02 -0300 [thread overview]
Message-ID: <20141014143902.GA9768@arch.hh.imgtec.org> (raw)
In-Reply-To: <1413296037-22346-1-git-send-email-tlinder@codeaurora.org>
On 14 Oct 05:13 PM, Tanya Brokhman wrote:
> diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c
> index 8876c7d..3532f8a 100644
> --- a/drivers/mtd/ubi/block.c
> +++ b/drivers/mtd/ubi/block.c
> @@ -111,12 +111,12 @@ static int __init ubiblock_set_param(const char *val,
>
> len = strnlen(val, UBIBLOCK_PARAM_LEN);
> if (len == 0) {
> - ubi_warn("block: empty 'block=' parameter - ignored\n");
> + pr_warn("block: empty 'block=' parameter - ignored\n");
No, this is wrong. The message should say something like "UBI: block", or
otherwise the user will think this comes from the block subsystem.
Please use some pr_fmt for this. Something like this before the headers
should be enough:
#define pr_fmt(fmt) "UBI: block:" fmt
You can then use pr_{info,warn,err} without the prefix like this:
pr_info("whatever");
Which prints "UBI: block: whatever".
See arch/arm/kernel/perf_event.c for an example of how this works.
Also:
> if (len == UBIBLOCK_PARAM_LEN) {
> - ubi_err("block: parameter \"%s\" is too long, max. is %d\n",
> + pr_warn("block: parameter \"%s\" is too long, max. is %d\n",
> val, UBIBLOCK_PARAM_LEN);
> return -EINVAL;
> }
Please replace the level properly ubi_err -> pr_err, ubi_warn -> pr_warn, etc.
--
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-10-14 14:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-14 14:13 [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities Tanya Brokhman
2014-10-14 14:16 ` Tanya Brokhman
2014-10-14 14:33 ` Joe Perches
2014-10-14 15:07 ` Artem Bityutskiy
2014-10-14 16:05 ` Joe Perches
2014-10-20 13:51 ` Artem Bityutskiy
2014-10-20 16:54 ` Tanya Brokhman
2014-10-20 17:29 ` Joe Perches
2014-10-14 14:39 ` Ezequiel Garcia [this message]
2014-10-14 15:09 ` Artem Bityutskiy
2014-10-14 18:47 ` Ezequiel Garcia
2014-10-14 19:13 ` Joe Perches
2014-10-14 19:18 ` Ezequiel Garcia
2014-10-14 19:31 ` Joe Perches
2014-10-20 13:53 ` Artem Bityutskiy
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=20141014143902.GA9768@arch.hh.imgtec.org \
--to=ezequiel.garcia@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=tlinder@codeaurora.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