Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1287818
| From | Rasmus Villemoes <linux@rasmusvillemoes.dk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() |
| Date | 2015-12-09 21:20 +0100 |
| Message-ID | <qDTnt-4C7-33@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <qDxZD-7Cj-1@gated-at.bofh.it> <qDAuu-Rv-1@gated-at.bofh.it> <qDLJg-8df-1@gated-at.bofh.it> <qDSB5-460-49@gated-at.bofh.it> <qDTdN-4yA-23@gated-at.bofh.it> |
| Organization | D03 |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-08 17:10 +0100
Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Joe Perches <joe@perches.com> - 2015-12-08 17:20 +0100
Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Joe Perches <joe@perches.com> - 2015-12-08 18:10 +0100
Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Rob Herring <robh+dt@kernel.org> - 2015-12-08 22:30 +0100
Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Joe Perches <joe@perches.com> - 2015-12-09 01:10 +0100
Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-09 13:10 +0100
Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Joe Perches <joe@perches.com> - 2015-12-09 20:30 +0100
Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-09 21:10 +0100
Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Joe Perches <joe@perches.com> - 2015-12-09 21:20 +0100
Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-12-09 21:20 +0100
Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-09 21:40 +0100
Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Joe Perches <joe@perches.com> - 2015-12-09 21:50 +0100
[PATCH] hexdump: Add ability to do endian conversions in print_hex_dump functions Joe Perches <joe@perches.com> - 2015-12-09 23:00 +0100
Re: [PATCH] hexdump: Add ability to do endian conversions in print_hex_dump functions Andrew Morton <akpm@linux-foundation.org> - 2015-12-09 23:10 +0100
Re: [PATCH] hexdump: Add ability to do endian conversions in print_hex_dump functions Joe Perches <joe@perches.com> - 2015-12-09 23:20 +0100
Re: [PATCH] hexdump: Add ability to do endian conversions in print_hex_dump functions Andrew Morton <akpm@linux-foundation.org> - 2015-12-09 23:50 +0100
Re: [PATCH] hexdump: Add ability to do endian conversions in print_hex_dump functions Joe Perches <joe@perches.com> - 2015-12-10 00:10 +0100
Re: [PATCH] hexdump: Add ability to do endian conversions in print_hex_dump functions Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-09 23:20 +0100
Re: [PATCH] hexdump: Add ability to do endian conversions in print_hex_dump functions Joe Perches <joe@perches.com> - 2015-12-09 23:30 +0100
Re: [PATCH] hexdump: Add ability to do endian conversions in print_hex_dump functions Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-10 00:10 +0100
Re: [PATCH] hexdump: Add ability to do endian conversions in print_hex_dump functions Joe Perches <joe@perches.com> - 2015-12-10 00:20 +0100
Re: [PATCH] hexdump: Add ability to do endian conversions in print_hex_dump functions kbuild test robot <lkp@intel.com> - 2015-12-10 07:00 +0100
Re: [PATCH] hexdump: Add ability to do endian conversions in print_hex_dump functions Joe Perches <joe@perches.com> - 2015-12-10 07:30 +0100
csiph-web