From: Richard Weinberger <richard@nod.at>
To: dedekind1@gmail.com
Cc: Tanya Brokhman <tlinder@codeaurora.org>,
linux-mtd@lists.infradead.org, linux-arm-msm@vger.kernel.org,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V6] UBI: Extend UBI layer debug/messaging capabilities
Date: Tue, 11 Nov 2014 13:25:32 +0100 [thread overview]
Message-ID: <5462003C.9090509@nod.at> (raw)
In-Reply-To: <1415707434.22887.158.camel@sauron.fi.intel.com>
Am 11.11.2014 um 13:03 schrieb Artem Bityutskiy:
> On Tue, 2014-11-11 at 09:15 +0100, Richard Weinberger wrote:
>>> Do we really want the function name in every log message?
>>> IMHO this is not wise except for pure debug logs.
>>
>> BTW: Why UBI-X? This looks odd. Either use UBIX or ubiX.
>
> How about something like this (untested):
>
>
> From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> Date: Tue, 11 Nov 2014 13:56:34 +0200
> Subject: [PATCH] UBI: clean-up printing helpers
>
> Let's prefix UBI messages with 'ubiX' instead of 'UBI-X' - this is more
> consistent with the way we name UBI devices.
>
> Also, commit "32608703 UBI: Extend UBI layer debug/messaging capabilities"
> added the function name print to 'ubi_msg()' - lets revert this change, since
> these messages are supposed to be just informative messages, and not debugging
> messages.
What is the benefit of having the function name still in ubi_warn() and ubi_err()?
e.g.
[ 95.511825] ubi0 error: ubi_attach_mtd_dev: mtd0 is already attached to ubi0
If the log message is so cryptic that you need to lookup it in the source to understand it,
we better fix the message.
> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> ---
> drivers/mtd/ubi/ubi.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
> index f80ffab..7a92283 100644
> --- a/drivers/mtd/ubi/ubi.h
> +++ b/drivers/mtd/ubi/ubi.h
> @@ -50,13 +50,13 @@
> #define UBI_NAME_STR "ubi"
>
> /* Normal UBI messages */
> -#define ubi_msg(ubi, fmt, ...) pr_notice("UBI-%d: %s:" fmt "\n", \
> - ubi->ubi_num, __func__, ##__VA_ARGS__)
> +#define ubi_msg(ubi, fmt, ...) pr_notice("ubi%d: " fmt "\n", \
> + ubi->ubi_num, ##__VA_ARGS__)
We could even use UBI_NAME_STR here. :-)
Thanks,
//richard
WARNING: multiple messages have this Message-ID (diff)
From: Richard Weinberger <richard@nod.at>
To: dedekind1@gmail.com
Cc: Tanya Brokhman <tlinder@codeaurora.org>,
linux-arm-msm@vger.kernel.org,
open list <linux-kernel@vger.kernel.org>,
linux-mtd@lists.infradead.org,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH V6] UBI: Extend UBI layer debug/messaging capabilities
Date: Tue, 11 Nov 2014 13:25:32 +0100 [thread overview]
Message-ID: <5462003C.9090509@nod.at> (raw)
In-Reply-To: <1415707434.22887.158.camel@sauron.fi.intel.com>
Am 11.11.2014 um 13:03 schrieb Artem Bityutskiy:
> On Tue, 2014-11-11 at 09:15 +0100, Richard Weinberger wrote:
>>> Do we really want the function name in every log message?
>>> IMHO this is not wise except for pure debug logs.
>>
>> BTW: Why UBI-X? This looks odd. Either use UBIX or ubiX.
>
> How about something like this (untested):
>
>
> From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> Date: Tue, 11 Nov 2014 13:56:34 +0200
> Subject: [PATCH] UBI: clean-up printing helpers
>
> Let's prefix UBI messages with 'ubiX' instead of 'UBI-X' - this is more
> consistent with the way we name UBI devices.
>
> Also, commit "32608703 UBI: Extend UBI layer debug/messaging capabilities"
> added the function name print to 'ubi_msg()' - lets revert this change, since
> these messages are supposed to be just informative messages, and not debugging
> messages.
What is the benefit of having the function name still in ubi_warn() and ubi_err()?
e.g.
[ 95.511825] ubi0 error: ubi_attach_mtd_dev: mtd0 is already attached to ubi0
If the log message is so cryptic that you need to lookup it in the source to understand it,
we better fix the message.
> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> ---
> drivers/mtd/ubi/ubi.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
> index f80ffab..7a92283 100644
> --- a/drivers/mtd/ubi/ubi.h
> +++ b/drivers/mtd/ubi/ubi.h
> @@ -50,13 +50,13 @@
> #define UBI_NAME_STR "ubi"
>
> /* Normal UBI messages */
> -#define ubi_msg(ubi, fmt, ...) pr_notice("UBI-%d: %s:" fmt "\n", \
> - ubi->ubi_num, __func__, ##__VA_ARGS__)
> +#define ubi_msg(ubi, fmt, ...) pr_notice("ubi%d: " fmt "\n", \
> + ubi->ubi_num, ##__VA_ARGS__)
We could even use UBI_NAME_STR here. :-)
Thanks,
//richard
next prev parent reply other threads:[~2014-11-11 12:25 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-03 13:58 [PATCH V6] UBI: Extend UBI layer debug/messaging capabilities Tanya Brokhman
2014-11-03 13:58 ` Tanya Brokhman
2014-11-03 13:58 ` Tanya Brokhman
2014-11-05 15:35 ` Artem Bityutskiy
2014-11-05 15:35 ` Artem Bityutskiy
2014-11-07 10:08 ` hujianyang
2014-11-07 10:08 ` hujianyang
2014-11-07 10:08 ` hujianyang
2014-11-07 12:32 ` Tanya Brokhman
2014-11-10 17:37 ` Richard Weinberger
2014-11-10 17:37 ` Richard Weinberger
2014-11-10 17:57 ` Joe Perches
2014-11-10 17:57 ` Joe Perches
2014-11-11 8:24 ` Tanya Brokhman
2014-11-11 8:24 ` Tanya Brokhman
2014-11-11 8:34 ` Joe Perches
2014-11-11 8:34 ` Joe Perches
2014-11-11 8:56 ` Richard Weinberger
2014-11-11 8:56 ` Richard Weinberger
2014-11-11 9:53 ` Tanya Brokhman
2014-11-11 11:35 ` Artem Bityutskiy
2014-11-11 11:44 ` Artem Bityutskiy
2014-11-11 11:44 ` Artem Bityutskiy
2014-11-11 8:15 ` Richard Weinberger
2014-11-11 8:15 ` Richard Weinberger
2014-11-11 12:03 ` Artem Bityutskiy
2014-11-11 12:03 ` Artem Bityutskiy
2014-11-11 12:25 ` Richard Weinberger [this message]
2014-11-11 12:25 ` Richard Weinberger
2014-11-11 13:27 ` Artem Bityutskiy
2014-11-11 13:27 ` Artem Bityutskiy
2014-11-11 19:49 ` Richard Weinberger
2014-11-11 19:49 ` Richard Weinberger
2014-11-12 12:32 ` Artem Bityutskiy
2014-11-12 12:32 ` Artem Bityutskiy
2014-12-29 3:14 ` hujianyang
2014-12-29 3:14 ` hujianyang
2014-12-29 3:14 ` hujianyang
2014-12-29 14:15 ` Tanya Brokhman
2014-12-29 14:15 ` Tanya Brokhman
2014-12-30 1:27 ` hujianyang
2014-12-30 1:27 ` hujianyang
2014-12-30 1:27 ` hujianyang
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=5462003C.9090509@nod.at \
--to=richard@nod.at \
--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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.