diff options
| -rw-r--r-- | tools/perf/util/trace-event-parse.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c index eda0a2488c19..93a82fead958 100644 --- a/tools/perf/util/trace-event-parse.c +++ b/tools/perf/util/trace-event-parse.c | |||
| @@ -284,18 +284,16 @@ void parse_ftrace_printk(char *file, unsigned int size __unused) | |||
| 284 | char *line; | 284 | char *line; |
| 285 | char *next = NULL; | 285 | char *next = NULL; |
| 286 | char *addr_str; | 286 | char *addr_str; |
| 287 | int ret; | 287 | char *fmt; |
| 288 | int i; | 288 | int i; |
| 289 | 289 | ||
| 290 | line = strtok_r(file, "\n", &next); | 290 | line = strtok_r(file, "\n", &next); |
| 291 | while (line) { | 291 | while (line) { |
| 292 | item = malloc_or_die(sizeof(*item)); | 292 | item = malloc_or_die(sizeof(*item)); |
| 293 | ret = sscanf(line, "%as : %as", | 293 | addr_str = strtok_r(line, ":", &fmt); |
| 294 | (float *)(void *)&addr_str, /* workaround gcc warning */ | ||
| 295 | (float *)(void *)&item->printk); | ||
| 296 | item->addr = strtoull(addr_str, NULL, 16); | 294 | item->addr = strtoull(addr_str, NULL, 16); |
| 297 | free(addr_str); | 295 | /* fmt still has a space, skip it */ |
| 298 | 296 | item->printk = strdup(fmt+1); | |
| 299 | item->next = list; | 297 | item->next = list; |
| 300 | list = item; | 298 | list = item; |
| 301 | line = strtok_r(NULL, "\n", &next); | 299 | line = strtok_r(NULL, "\n", &next); |
| @@ -2274,8 +2272,9 @@ static struct print_arg *make_bprint_args(char *fmt, void *data, int size, struc | |||
| 2274 | case 'u': | 2272 | case 'u': |
| 2275 | case 'x': | 2273 | case 'x': |
| 2276 | case 'i': | 2274 | case 'i': |
| 2277 | bptr = (void *)(((unsigned long)bptr + (long_size - 1)) & | 2275 | /* the pointers are always 4 bytes aligned */ |
| 2278 | ~(long_size - 1)); | 2276 | bptr = (void *)(((unsigned long)bptr + 3) & |
| 2277 | ~3); | ||
| 2279 | switch (ls) { | 2278 | switch (ls) { |
| 2280 | case 0: | 2279 | case 0: |
| 2281 | case 1: | 2280 | case 1: |
