[patch-rt 1/4] ftrace: fix swapped nibbles in tracer raw hex output
From: Thomas Gleixner
Date: Wed Jan 28 2009 - 16:46:18 EST
backport from 2.6.28 mainline
Signed-off-by: Carsten Emde <Carsten.Emde@xxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
kernel/trace/trace.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
Index: linux-2.6.26/kernel/trace/trace.c
===================================================================
--- linux-2.6.26.orig/kernel/trace/trace.c
+++ linux-2.6.26/kernel/trace/trace.c
@@ -421,7 +421,6 @@ trace_seq_putmem_hex(struct trace_seq *s
{
unsigned char hex[HEX_CHARS];
unsigned char *data = mem;
- unsigned char byte;
int i, j;
BUG_ON(len >= HEX_CHARS);
@@ -431,10 +430,8 @@ trace_seq_putmem_hex(struct trace_seq *s
#else
for (i = len-1, j = 0; i >= 0; i--) {
#endif
- byte = data[i];
-
- hex[j++] = hex2asc[byte & 0x0f];
- hex[j++] = hex2asc[byte >> 4];
+ hex[j++] = hex_asc_hi(data[i]);
+ hex[j++] = hex_asc_lo(data[i]);
}
hex[j++] = ' ';
--
--
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/