From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753293AbbLIURq (ORCPT ); Wed, 9 Dec 2015 15:17:46 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:32874 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752412AbbLIURm (ORCPT ); Wed, 9 Dec 2015 15:17:42 -0500 From: Rasmus Villemoes To: Andy Shevchenko Cc: Joe Perches , Rob Herring , Andrew Morton , Masahiro Yamada , "devicetree\@vger.kernel.org" , Frank Rowand , "linux-kernel\@vger.kernel.org" , Grant Likely Subject: Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Organization: D03 References: <1449590868-19070-1-git-send-email-yamada.masahiro@socionext.com> <1449591386.3315.2.camel@perches.com> <1449594231.13275.2.camel@perches.com> <1449619439.18646.20.camel@perches.com> <1449689319.25389.28.camel@perches.com> X-Hashcash: 1:20:151209:andy.shevchenko@gmail.com::bWIVI49E3iceGye+:0000000000000000000000000000000000000qQg X-Hashcash: 1:20:151209:grant.likely@linaro.org::P/30woHMLWPTs+zc:000000000000000000000000000000000000000rMO X-Hashcash: 1:20:151209:robh+dt@kernel.org::y5gylXTtLDn+epyQ:00000000000000000000000000000000000000000001j4p X-Hashcash: 1:20:151209:linux-kernel@vger.kernel.org::GW3mh98IBUlwdKcH:0000000000000000000000000000000004QTu X-Hashcash: 1:20:151209:joe@perches.com::R7HgbYmQPHxxAc0e:006dou X-Hashcash: 1:20:151209:frowand.list@gmail.com::eCYmPQc47y6+CJzc:0000000000000000000000000000000000000006eIJ X-Hashcash: 1:20:151209:yamada.masahiro@socionext.com::kwCTb1ax31IYEx05:000000000000000000000000000000008192 X-Hashcash: 1:20:151209:devicetree@vger.kernel.org::Dt2rQ3MIPCXMabJh:00000000000000000000000000000000000CQEn X-Hashcash: 1:20:151209:akpm@linux-foundation.org::o2KZT31R6aOwgOg7:000000000000000000000000000000000000IQxX Date: Wed, 09 Dec 2015 21:17:37 +0100 In-Reply-To: (Andy Shevchenko's message of "Wed, 9 Dec 2015 22:02:26 +0200") Message-ID: <87si3b8jha.fsf@rasmusvillemoes.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 09 2015, Andy Shevchenko wrote: > On Wed, Dec 9, 2015 at 9:28 PM, Joe Perches 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