aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-02-03 19:05:50 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-04 14:48:39 -0500
commitae7462b4f1fe1f36b5d562dbd5202a2eba01f072 (patch)
treeceb9db3c0e90d4a459dac695ca7b2e2fddf70b32 /kernel/trace
parentd9793bd8018f835c64b10f44e278c86cecb8e932 (diff)
trace: make the trace_event callbacks return enum print_line_t
As they actually all return these enumerators. Reported-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace.c2
-rw-r--r--kernel/trace/trace_branch.c3
-rw-r--r--kernel/trace/trace_output.c52
-rw-r--r--kernel/trace/trace_output.h5
4 files changed, 37 insertions, 25 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 5822ff4e5a3e..fd51cf0b94c7 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1495,7 +1495,7 @@ static enum print_line_t print_hex_fmt(struct trace_iterator *iter)
1495 1495
1496 event = ftrace_find_event(entry->type); 1496 event = ftrace_find_event(entry->type);
1497 if (event && event->hex) { 1497 if (event && event->hex) {
1498 int ret = event->hex(iter, 0); 1498 enum print_line_t ret = event->hex(iter, 0);
1499 if (ret != TRACE_TYPE_HANDLED) 1499 if (ret != TRACE_TYPE_HANDLED)
1500 return ret; 1500 return ret;
1501 } 1501 }
diff --git a/kernel/trace/trace_branch.c b/kernel/trace/trace_branch.c
index f6b35e162dfa..7ac72a44b2d3 100644
--- a/kernel/trace/trace_branch.c
+++ b/kernel/trace/trace_branch.c
@@ -160,7 +160,8 @@ trace_print_print(struct trace_seq *s, struct trace_entry *entry, int flags)
160 return TRACE_TYPE_PARTIAL_LINE; 160 return TRACE_TYPE_PARTIAL_LINE;
161} 161}
162 162
163static int trace_branch_print(struct trace_iterator *iter, int flags) 163static enum print_line_t trace_branch_print(struct trace_iterator *iter,
164 int flags)
164{ 165{
165 struct trace_branch *field; 166 struct trace_branch *field;
166 167
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index 5b3c914053f2..b7380eee9fa1 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -463,13 +463,14 @@ int unregister_ftrace_event(struct trace_event *event)
463 * Standard events 463 * Standard events
464 */ 464 */
465 465
466int trace_nop_print(struct trace_iterator *iter, int flags) 466enum print_line_t trace_nop_print(struct trace_iterator *iter, int flags)
467{ 467{
468 return TRACE_TYPE_HANDLED; 468 return TRACE_TYPE_HANDLED;
469} 469}
470 470
471/* TRACE_FN */ 471/* TRACE_FN */
472static int trace_fn_latency(struct trace_iterator *iter, int flags) 472static enum print_line_t trace_fn_latency(struct trace_iterator *iter,
473 int flags)
473{ 474{
474 struct ftrace_entry *field; 475 struct ftrace_entry *field;
475 struct trace_seq *s = &iter->seq; 476 struct trace_seq *s = &iter->seq;
@@ -491,7 +492,7 @@ static int trace_fn_latency(struct trace_iterator *iter, int flags)
491 return TRACE_TYPE_PARTIAL_LINE; 492 return TRACE_TYPE_PARTIAL_LINE;
492} 493}
493 494
494static int trace_fn_trace(struct trace_iterator *iter, int flags) 495static enum print_line_t trace_fn_trace(struct trace_iterator *iter, int flags)
495{ 496{
496 struct ftrace_entry *field; 497 struct ftrace_entry *field;
497 struct trace_seq *s = &iter->seq; 498 struct trace_seq *s = &iter->seq;
@@ -518,7 +519,7 @@ static int trace_fn_trace(struct trace_iterator *iter, int flags)
518 return TRACE_TYPE_PARTIAL_LINE; 519 return TRACE_TYPE_PARTIAL_LINE;
519} 520}
520 521
521static int trace_fn_raw(struct trace_iterator *iter, int flags) 522static enum print_line_t trace_fn_raw(struct trace_iterator *iter, int flags)
522{ 523{
523 struct ftrace_entry *field; 524 struct ftrace_entry *field;
524 525
@@ -532,7 +533,7 @@ static int trace_fn_raw(struct trace_iterator *iter, int flags)
532 return TRACE_TYPE_HANDLED; 533 return TRACE_TYPE_HANDLED;
533} 534}
534 535
535static int trace_fn_hex(struct trace_iterator *iter, int flags) 536static enum print_line_t trace_fn_hex(struct trace_iterator *iter, int flags)
536{ 537{
537 struct ftrace_entry *field; 538 struct ftrace_entry *field;
538 struct trace_seq *s = &iter->seq; 539 struct trace_seq *s = &iter->seq;
@@ -545,7 +546,7 @@ static int trace_fn_hex(struct trace_iterator *iter, int flags)
545 return TRACE_TYPE_HANDLED; 546 return TRACE_TYPE_HANDLED;
546} 547}
547 548
548static int trace_fn_bin(struct trace_iterator *iter, int flags) 549static enum print_line_t trace_fn_bin(struct trace_iterator *iter, int flags)
549{ 550{
550 struct ftrace_entry *field; 551 struct ftrace_entry *field;
551 struct trace_seq *s = &iter->seq; 552 struct trace_seq *s = &iter->seq;
@@ -568,7 +569,8 @@ static struct trace_event trace_fn_event = {
568}; 569};
569 570
570/* TRACE_CTX an TRACE_WAKE */ 571/* TRACE_CTX an TRACE_WAKE */
571static int trace_ctxwake_print(struct trace_iterator *iter, char *delim) 572static enum print_line_t trace_ctxwake_print(struct trace_iterator *iter,
573 char *delim)
572{ 574{
573 struct ctx_switch_entry *field; 575 struct ctx_switch_entry *field;
574 char *comm; 576 char *comm;
@@ -593,12 +595,13 @@ static int trace_ctxwake_print(struct trace_iterator *iter, char *delim)
593 return TRACE_TYPE_HANDLED; 595 return TRACE_TYPE_HANDLED;
594} 596}
595 597
596static int trace_ctx_print(struct trace_iterator *iter, int flags) 598static enum print_line_t trace_ctx_print(struct trace_iterator *iter, int flags)
597{ 599{
598 return trace_ctxwake_print(iter, "==>"); 600 return trace_ctxwake_print(iter, "==>");
599} 601}
600 602
601static int trace_wake_print(struct trace_iterator *iter, int flags) 603static enum print_line_t trace_wake_print(struct trace_iterator *iter,
604 int flags)
602{ 605{
603 return trace_ctxwake_print(iter, " +"); 606 return trace_ctxwake_print(iter, " +");
604} 607}
@@ -626,12 +629,12 @@ static int trace_ctxwake_raw(struct trace_iterator *iter, char S)
626 return TRACE_TYPE_HANDLED; 629 return TRACE_TYPE_HANDLED;
627} 630}
628 631
629static int trace_ctx_raw(struct trace_iterator *iter, int flags) 632static enum print_line_t trace_ctx_raw(struct trace_iterator *iter, int flags)
630{ 633{
631 return trace_ctxwake_raw(iter, 0); 634 return trace_ctxwake_raw(iter, 0);
632} 635}
633 636
634static int trace_wake_raw(struct trace_iterator *iter, int flags) 637static enum print_line_t trace_wake_raw(struct trace_iterator *iter, int flags)
635{ 638{
636 return trace_ctxwake_raw(iter, '+'); 639 return trace_ctxwake_raw(iter, '+');
637} 640}
@@ -660,17 +663,18 @@ static int trace_ctxwake_hex(struct trace_iterator *iter, char S)
660 return TRACE_TYPE_HANDLED; 663 return TRACE_TYPE_HANDLED;
661} 664}
662 665
663static int trace_ctx_hex(struct trace_iterator *iter, int flags) 666static enum print_line_t trace_ctx_hex(struct trace_iterator *iter, int flags)
664{ 667{
665 return trace_ctxwake_hex(iter, 0); 668 return trace_ctxwake_hex(iter, 0);
666} 669}
667 670
668static int trace_wake_hex(struct trace_iterator *iter, int flags) 671static enum print_line_t trace_wake_hex(struct trace_iterator *iter, int flags)
669{ 672{
670 return trace_ctxwake_hex(iter, '+'); 673 return trace_ctxwake_hex(iter, '+');
671} 674}
672 675
673static int trace_ctxwake_bin(struct trace_iterator *iter, int flags) 676static enum print_line_t trace_ctxwake_bin(struct trace_iterator *iter,
677 int flags)
674{ 678{
675 struct ctx_switch_entry *field; 679 struct ctx_switch_entry *field;
676 struct trace_seq *s = &iter->seq; 680 struct trace_seq *s = &iter->seq;
@@ -706,7 +710,8 @@ static struct trace_event trace_wake_event = {
706}; 710};
707 711
708/* TRACE_SPECIAL */ 712/* TRACE_SPECIAL */
709static int trace_special_print(struct trace_iterator *iter, int flags) 713static enum print_line_t trace_special_print(struct trace_iterator *iter,
714 int flags)
710{ 715{
711 struct special_entry *field; 716 struct special_entry *field;
712 717
@@ -721,7 +726,8 @@ static int trace_special_print(struct trace_iterator *iter, int flags)
721 return TRACE_TYPE_HANDLED; 726 return TRACE_TYPE_HANDLED;
722} 727}
723 728
724static int trace_special_hex(struct trace_iterator *iter, int flags) 729static enum print_line_t trace_special_hex(struct trace_iterator *iter,
730 int flags)
725{ 731{
726 struct special_entry *field; 732 struct special_entry *field;
727 struct trace_seq *s = &iter->seq; 733 struct trace_seq *s = &iter->seq;
@@ -735,7 +741,8 @@ static int trace_special_hex(struct trace_iterator *iter, int flags)
735 return TRACE_TYPE_HANDLED; 741 return TRACE_TYPE_HANDLED;
736} 742}
737 743
738static int trace_special_bin(struct trace_iterator *iter, int flags) 744static enum print_line_t trace_special_bin(struct trace_iterator *iter,
745 int flags)
739{ 746{
740 struct special_entry *field; 747 struct special_entry *field;
741 struct trace_seq *s = &iter->seq; 748 struct trace_seq *s = &iter->seq;
@@ -760,7 +767,8 @@ static struct trace_event trace_special_event = {
760 767
761/* TRACE_STACK */ 768/* TRACE_STACK */
762 769
763static int trace_stack_print(struct trace_iterator *iter, int flags) 770static enum print_line_t trace_stack_print(struct trace_iterator *iter,
771 int flags)
764{ 772{
765 struct stack_entry *field; 773 struct stack_entry *field;
766 struct trace_seq *s = &iter->seq; 774 struct trace_seq *s = &iter->seq;
@@ -796,7 +804,8 @@ static struct trace_event trace_stack_event = {
796}; 804};
797 805
798/* TRACE_USER_STACK */ 806/* TRACE_USER_STACK */
799static int trace_user_stack_print(struct trace_iterator *iter, int flags) 807static enum print_line_t trace_user_stack_print(struct trace_iterator *iter,
808 int flags)
800{ 809{
801 struct userstack_entry *field; 810 struct userstack_entry *field;
802 struct trace_seq *s = &iter->seq; 811 struct trace_seq *s = &iter->seq;
@@ -825,7 +834,8 @@ static struct trace_event trace_user_stack_event = {
825}; 834};
826 835
827/* TRACE_PRINT */ 836/* TRACE_PRINT */
828static int trace_print_print(struct trace_iterator *iter, int flags) 837static enum print_line_t trace_print_print(struct trace_iterator *iter,
838 int flags)
829{ 839{
830 struct print_entry *field; 840 struct print_entry *field;
831 struct trace_seq *s = &iter->seq; 841 struct trace_seq *s = &iter->seq;
@@ -844,7 +854,7 @@ static int trace_print_print(struct trace_iterator *iter, int flags)
844 return TRACE_TYPE_PARTIAL_LINE; 854 return TRACE_TYPE_PARTIAL_LINE;
845} 855}
846 856
847static int trace_print_raw(struct trace_iterator *iter, int flags) 857static enum print_line_t trace_print_raw(struct trace_iterator *iter, int flags)
848{ 858{
849 struct print_entry *field; 859 struct print_entry *field;
850 860
diff --git a/kernel/trace/trace_output.h b/kernel/trace/trace_output.h
index 3aeb31f6506b..551a25a72217 100644
--- a/kernel/trace/trace_output.h
+++ b/kernel/trace/trace_output.h
@@ -3,7 +3,8 @@
3 3
4#include "trace.h" 4#include "trace.h"
5 5
6typedef int (*trace_print_func)(struct trace_iterator *iter, int flags); 6typedef enum print_line_t (*trace_print_func)(struct trace_iterator *iter,
7 int flags);
7 8
8struct trace_event { 9struct trace_event {
9 struct hlist_node node; 10 struct hlist_node node;
@@ -39,7 +40,7 @@ struct trace_event *ftrace_find_event(int type);
39int register_ftrace_event(struct trace_event *event); 40int register_ftrace_event(struct trace_event *event);
40int unregister_ftrace_event(struct trace_event *event); 41int unregister_ftrace_event(struct trace_event *event);
41 42
42int trace_nop_print(struct trace_iterator *iter, int flags); 43enum print_line_t trace_nop_print(struct trace_iterator *iter, int flags);
43 44
44#define MAX_MEMHEX_BYTES 8 45#define MAX_MEMHEX_BYTES 8
45#define HEX_CHARS (MAX_MEMHEX_BYTES*2 + 1) 46#define HEX_CHARS (MAX_MEMHEX_BYTES*2 + 1)