From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Joe Perches <joe@perches.com>, Rob Herring <robh+dt@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
"devicetree\@vger.kernel.org" <devicetree@vger.kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Grant Likely <grant.likely@linaro.org>
Subject: Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err()
Date: Wed, 09 Dec 2015 21:17:37 +0100 [thread overview]
Message-ID: <87si3b8jha.fsf@rasmusvillemoes.dk> (raw)
In-Reply-To: <CAHp75VdHrG_uk9K7B=q8+ZnjNehJ2AY=-RsMGByxn62Uh_-sRA@mail.gmail.com> (Andy Shevchenko's message of "Wed, 9 Dec 2015 22:02:26 +0200")
On Wed, Dec 09 2015, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> On Wed, Dec 9, 2015 at 9:28 PM, Joe Perches <joe@perches.com> wrote:
>> ---
>> include/linux/printk.h | 7 +++++++
>> lib/hexdump.c | 39 +++++++++++++++++++++++++++++++--------
>> 2 files changed, 38 insertions(+), 8 deletions(-)
>>
>> diff --git a/include/linux/printk.h b/include/linux/printk.h
>> index 9729565..4be190c 100644
>> --- a/include/linux/printk.h
>> +++ b/include/linux/printk.h
>> @@ -424,6 +424,13 @@ enum {
>> DUMP_PREFIX_ADDRESS,
>> DUMP_PREFIX_OFFSET
>> };
>> +
>> +enum {
>> + DUMP_TYPE_CPU = 0,
>
> And still open this, do we need it? I think you may just mention in
> the documentation that default behaviour is CPU like.
I think it's best to have a name for the default. In this case it's
unlikely to ever be relevant, but in general one could imagine stuff
like
#ifdef THIS_OR_THAT
#define MY_DUMP_TYPE DUMP_TYPE_LE
#else
#define MY_DUMP_TYPE DUMP_TYPE_CPU
#endif
which is a lot more readable than if the latter was a naked 0.
The feature seems fine to me. It's always been somewhat annoying that
grouping changes the order of the byte values on little-endian machines
(so grouping is actually a wrong name for it; it's more like "treat the
bytes an array of u16/u32/u64"), and one can now get around that by
specifying DUMP_TYPE_BE.
Rasmus
next prev parent reply other threads:[~2015-12-09 20:17 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-08 16:07 Masahiro Yamada
2015-12-08 16:16 ` Joe Perches
2015-12-08 17:03 ` Joe Perches
2015-12-08 21:28 ` Rob Herring
2015-12-09 0:03 ` Joe Perches
2015-12-09 12:03 ` Andy Shevchenko
2015-12-09 19:28 ` Joe Perches
2015-12-09 20:02 ` Andy Shevchenko
2015-12-09 20:09 ` Joe Perches
2015-12-09 20:17 ` Rasmus Villemoes [this message]
2015-12-09 20:36 ` Andy Shevchenko
2015-12-09 20:42 ` Joe Perches
2015-12-09 21:59 ` [PATCH] hexdump: Add ability to do endian conversions in print_hex_dump functions Joe Perches
2015-12-09 22:09 ` Andrew Morton
2015-12-09 22:16 ` Joe Perches
2015-12-09 22:45 ` Andrew Morton
2015-12-09 23:02 ` Joe Perches
2015-12-09 22:11 ` Andy Shevchenko
2015-12-09 22:22 ` Joe Perches
2015-12-09 23:09 ` Andy Shevchenko
2015-12-09 23:15 ` Joe Perches
2015-12-10 5:55 ` kbuild test robot
2015-12-10 6:20 ` Joe Perches
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=87si3b8jha.fsf@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=akpm@linux-foundation.org \
--cc=andy.shevchenko@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=grant.likely@linaro.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=yamada.masahiro@socionext.com \
/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
Powered by JetHome