Cc: Sam Ravnborg <sam@...>, <linux-kernel@...>, Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, Thomas Gleixner <tglx@...>, Jason Wessel <jason.wessel@...>
On Feb 10, 2008 8:36 AM, Ingo Molnar <mingo@elte.hu> wrote:
Am I missing something? (I'm due, so it's not really a rhetorical
question :-) .) Wouldn't
unsigned int void u64_to_hex(u64 val, unsigned char *buf)
{
int i;
for (i=15; i>=0; i--) {
buf[i] = hexchars[ val & 0x0f ];
val >>= 4;
}
return 16;
}
...
buf += u64_to_hex(cpu_to_be64(tmp_ll), buf);
be clearer both visually, and code-as-intent? (And equivalent helpers
for u32, u16 -- though they could all be rolled into one.)
--