Messages in this thread Patch in this message | | | Date | Wed, 28 Jan 2009 21:29:08 -0000 | From | Thomas Gleixner <> | Subject | [patch-rt 1/4] ftrace: fix swapped nibbles in tracer raw hex output |
| |
backport from 2.6.28 mainline
Signed-off-by: Carsten Emde <Carsten.Emde@osadl.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- 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++] = ' '; --
| |