lkml.org 
[lkml]   [2009]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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++] = ' ';

--



\
 
 \ /
  Last update: 2009-01-28 22:49    [W:0.033 / U:0.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site