diff options
author | Srikar Dronamraju <srikar@linux.vnet.ibm.com> | 2012-04-09 05:11:33 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-05-07 08:29:35 -0400 |
commit | 3a6b76661da8e92124a813b43607f5bec1a618de (patch) | |
tree | 83ef43201acc68b1848f7e63a92f7cb318cbac82 /kernel | |
parent | cbc91f71b51b8335f1fc7ccfca8011f31a717367 (diff) |
tracing: Modify is_delete, is_return from int to bool
is_delete and is_return can take utmost 2 values and are better
of being a boolean than a int. There are no functional changes.
Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Jim Keniston <jkenisto@linux.vnet.ibm.com>
Cc: Linux-mm <linux-mm@kvack.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Anton Arapov <anton@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20120409091133.8343.65289.sendpatchset@srdronam.in.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace_kprobe.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index 580a05ec926b..4f935f83cd46 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c | |||
@@ -651,7 +651,7 @@ static struct trace_probe *alloc_trace_probe(const char *group, | |||
651 | void *addr, | 651 | void *addr, |
652 | const char *symbol, | 652 | const char *symbol, |
653 | unsigned long offs, | 653 | unsigned long offs, |
654 | int nargs, int is_return) | 654 | int nargs, bool is_return) |
655 | { | 655 | { |
656 | struct trace_probe *tp; | 656 | struct trace_probe *tp; |
657 | int ret = -ENOMEM; | 657 | int ret = -ENOMEM; |
@@ -944,7 +944,7 @@ static int split_symbol_offset(char *symbol, unsigned long *offset) | |||
944 | #define PARAM_MAX_STACK (THREAD_SIZE / sizeof(unsigned long)) | 944 | #define PARAM_MAX_STACK (THREAD_SIZE / sizeof(unsigned long)) |
945 | 945 | ||
946 | static int parse_probe_vars(char *arg, const struct fetch_type *t, | 946 | static int parse_probe_vars(char *arg, const struct fetch_type *t, |
947 | struct fetch_param *f, int is_return) | 947 | struct fetch_param *f, bool is_return) |
948 | { | 948 | { |
949 | int ret = 0; | 949 | int ret = 0; |
950 | unsigned long param; | 950 | unsigned long param; |
@@ -977,7 +977,7 @@ static int parse_probe_vars(char *arg, const struct fetch_type *t, | |||
977 | 977 | ||
978 | /* Recursive argument parser */ | 978 | /* Recursive argument parser */ |
979 | static int __parse_probe_arg(char *arg, const struct fetch_type *t, | 979 | static int __parse_probe_arg(char *arg, const struct fetch_type *t, |
980 | struct fetch_param *f, int is_return) | 980 | struct fetch_param *f, bool is_return) |
981 | { | 981 | { |
982 | int ret = 0; | 982 | int ret = 0; |
983 | unsigned long param; | 983 | unsigned long param; |
@@ -1089,7 +1089,7 @@ static int __parse_bitfield_probe_arg(const char *bf, | |||
1089 | 1089 | ||
1090 | /* String length checking wrapper */ | 1090 | /* String length checking wrapper */ |
1091 | static int parse_probe_arg(char *arg, struct trace_probe *tp, | 1091 | static int parse_probe_arg(char *arg, struct trace_probe *tp, |
1092 | struct probe_arg *parg, int is_return) | 1092 | struct probe_arg *parg, bool is_return) |
1093 | { | 1093 | { |
1094 | const char *t; | 1094 | const char *t; |
1095 | int ret; | 1095 | int ret; |
@@ -1162,7 +1162,7 @@ static int create_trace_probe(int argc, char **argv) | |||
1162 | */ | 1162 | */ |
1163 | struct trace_probe *tp; | 1163 | struct trace_probe *tp; |
1164 | int i, ret = 0; | 1164 | int i, ret = 0; |
1165 | int is_return = 0, is_delete = 0; | 1165 | bool is_return = false, is_delete = false; |
1166 | char *symbol = NULL, *event = NULL, *group = NULL; | 1166 | char *symbol = NULL, *event = NULL, *group = NULL; |
1167 | char *arg; | 1167 | char *arg; |
1168 | unsigned long offset = 0; | 1168 | unsigned long offset = 0; |
@@ -1171,11 +1171,11 @@ static int create_trace_probe(int argc, char **argv) | |||
1171 | 1171 | ||
1172 | /* argc must be >= 1 */ | 1172 | /* argc must be >= 1 */ |
1173 | if (argv[0][0] == 'p') | 1173 | if (argv[0][0] == 'p') |
1174 | is_return = 0; | 1174 | is_return = false; |
1175 | else if (argv[0][0] == 'r') | 1175 | else if (argv[0][0] == 'r') |
1176 | is_return = 1; | 1176 | is_return = true; |
1177 | else if (argv[0][0] == '-') | 1177 | else if (argv[0][0] == '-') |
1178 | is_delete = 1; | 1178 | is_delete = true; |
1179 | else { | 1179 | else { |
1180 | pr_info("Probe definition must be started with 'p', 'r' or" | 1180 | pr_info("Probe definition must be started with 'p', 'r' or" |
1181 | " '-'.\n"); | 1181 | " '-'.\n"); |