From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752272AbbLIUJ4 (ORCPT ); Wed, 9 Dec 2015 15:09:56 -0500 Received: from smtprelay0251.hostedemail.com ([216.40.44.251]:42284 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752055AbbLIUJe (ORCPT ); Wed, 9 Dec 2015 15:09:34 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1543:1593:1594:1605:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:2890:3138:3139:3140:3141:3142:3622:3743:3865:3866:3867:3868:3870:3871:3872:3873:3874:4042:4250:4321:5007:6261:7903:8603:10004:10400:10848:11026:11232:11473:11658:11783:11889:11914:12043:12291:12295:12296:12517:12519:12555:12663:12683:12740:13161:13229:13894:14659:21080:30001:30003:30034:30054:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: chalk95_700c63275201d X-Filterd-Recvd-Size: 4612 Message-ID: <1449691768.25389.51.camel@perches.com> Subject: Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() From: Joe Perches To: Andy Shevchenko Cc: Rob Herring , Andrew Morton , Masahiro Yamada , "devicetree@vger.kernel.org" , Frank Rowand , "linux-kernel@vger.kernel.org" , Grant Likely , Rasmus Villemoes Date: Wed, 09 Dec 2015 12:09:28 -0800 In-Reply-To: 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> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.2-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2015-12-09 at 22:02 +0200, Andy Shevchenko wrote: > On Wed, Dec 9, 2015 at 9:28 PM, Joe Perches wrote: [] > > > > diff --git a/lib/hexdump.c b/lib/hexdump.c > > > > index 992457b..49113aa 100644 > > > > --- a/lib/hexdump.c > > > > +++ b/lib/hexdump.c > > > > @@ -81,6 +81,7 @@ EXPORT_SYMBOL(bin2hex); > > > >   * @len: number of bytes in the @buf > > > >   * @rowsize: number of bytes to print per line; must be 16 or 32 > > > >   * @groupsize: number of bytes to print at a time (1, 2, 4, 8; default = 1) > > > > + *             OR'd with DUMP_TYPE_BE or DUMP_TYPE_LE for endian conversions > > > >   * @linebuf: where to put the converted data > > > >   * @linebuflen: total size of @linebuf, including space for terminating NUL > > > >   * @ascii: include ASCII after the hex output > > > > @@ -114,19 +115,20 @@ int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, int groupsize, > > > >         int j, lx = 0; > > > >         int ascii_column; > > > >         int ret; > > > > +       int actual_groupsize = groupsize & ~(DUMP_TYPE_LE | DUMP_TYPE_BE); > > > > > > I would rather prefer to have function parameter to be renamed. > > > > > > E.g. gsflags ? > > > > > > > Well, it's a bit simpler changelog. > > Generally I'm fine with this version, though take into account above and below. > > > --- > >  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. The only documentation I'm aware of is the kernel-doc > > +       DUMP_TYPE_LE = BIT(30), > > +       DUMP_TYPE_BE = BIT(31) > > +}; > > + > >  extern int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, > >                               int groupsize, char *linebuf, size_t linebuflen, > > Here as well to change. Right, thanks. > >                               bool ascii); > > diff --git a/lib/hexdump.c b/lib/hexdump.c > > index 992457b..5b1eda70 100644 > > --- a/lib/hexdump.c > > +++ b/lib/hexdump.c > > @@ -80,7 +80,8 @@ EXPORT_SYMBOL(bin2hex); > >   * @buf: data blob to dump > >   * @len: number of bytes in the @buf > >   * @rowsize: number of bytes to print per line; must be 16 or 32 > > - * @groupsize: number of bytes to print at a time (1, 2, 4, 8; default = 1) > > + * @groupflags: number of bytes to print at a time (1, 2, 4, 8; default = 1) > > + *              OR with DUMP_TYPE_BE or DUMP_TYPE_LE for endian conversions > > Maybe specify "bitwise OR with.." ?