Re: [RFC PATCH] lib/vsprintf.c: Simplify uuid_string()
From: Joe Perches
Date: Mon May 11 2015 - 12:49:45 EST
On Mon, 2015-05-11 at 12:32 -0400, George Spelvin wrote:
> I suspect it's a speedup, but since this is not hot code, the important
> part is that it shrinks the function from 332 to 256 bytes.
shrinking code in vsprintf is always good
> diff --git a/lib/vsprintf.c b/lib/vsprintf.c
[]
> for (i = 0; i < 16; i++) {
> - p = hex_byte_pack(p, addr[index[i]]);
> + u8 byte = addr[index[i]];
> + *p++ = hex[x >> 4];
> + *p++ = hex[x & 0x0f];
?
*p++ = hex[byte >> 4];
*p++ = hex[byte & 0x0f];
--
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/