lkml.org 
[lkml]   [2008]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/4] lib: add ascii hex helper functions
From
Date
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



\
 
 \ /
  Last update: 2008-05-01 23:37    [W:0.048 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site