Re: [PATCH] ftrace: simplify hex print
From: Heiko Carstens
Date: Fri Apr 18 2008 - 09:23:14 EST
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@xxxxxxxxxxxxx>
> +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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/