public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/4] lib: add ascii hex helper functions
Date: Thu, 01 May 2008 14:35:06 -0700	[thread overview]
Message-ID: <1209677706.24729.173.camel@brick> (raw)
In-Reply-To: <1209677314.4841.13.camel@localhost>

On Thu, 2008-05-01 at 14:28 -0700, Joe Perches wrote:
> On Thu, 2008-05-01 at 13:51 -0700, Harvey Harrison wrote:
> > Everyone rolls their own version around the tree, centralize
> > in lib/hexdump.c
> > 
> > Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
> > ---
> >  include/linux/kernel.h |    6 +++++-
> >  lib/hexdump.c          |   25 +++++++++++++++++++++++--
> >  2 files changed, 28 insertions(+), 3 deletions(-)
> > 
> > diff --git a/include/linux/kernel.h b/include/linux/kernel.h
> > index 4d46e29..20cae9a 100644
> > --- a/include/linux/kernel.h
> > +++ b/include/linux/kernel.h
> > @@ -276,7 +276,11 @@ extern void print_hex_dump(const char *level, const char *prefix_str,
> >  				const void *buf, size_t len, bool ascii);
> >  extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
> >  			const void *buf, size_t len);
> > -#define hex_asc(x)	"0123456789abcdef"[x]
> > +
> > +extern const char hex_asc[];
> 
> I don't see a reason hex_asc should be extern.
> It's only used by hexdump.
> I think it better to remove hex_asc from kernel.h altogether.
> 
> 

The whole point is to start to centralize everybody's private copy of
a hex_asc equivalent.

Harvey


  reply	other threads:[~2008-05-01 21:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-01 20:51 [PATCH 1/4] lib: add ascii hex helper functions Harvey Harrison
2008-05-01 21:15 ` Andrew Morton
2008-05-01 21:32   ` Harvey Harrison
2008-05-01 21:28 ` Joe Perches
2008-05-01 21:35   ` Harvey Harrison [this message]
2008-05-01 21:44     ` Joe Perches
2008-05-01 21:58       ` Harvey Harrison

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=1209677706.24729.173.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox