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    [W:0.020 / U:120.560 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site