lkml.org 
[lkml]   [2008]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ftrace: simplify hex print
On Fri, Apr 18, 2008 at 02:33:20PM +0200, Thomas Gleixner wrote:
> simplify hex to ascii conversion with a lookup table.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> +static const char hex2asc[] = "0123456789abcdef";
[...]
> + hex[j++] = hex2asc[byte & 0x0f];
> + hex[j++] = hex2asc[byte >> 4];

we have hex_asc() in include/linux/kernel.h already.


\
 
 \ /
  Last update: 2008-04-18 15:25    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site