Skip to content

Commit 3a6b766

Browse files
srikardIngo Molnar
authored andcommitted
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 <[email protected]> Acked-by: Steven Rostedt <[email protected]> Acked-by: Masami Hiramatsu <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Ananth N Mavinakayanahalli <[email protected]> Cc: Jim Keniston <[email protected]> Cc: Linux-mm <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Anton Arapov <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent cbc91f7 commit 3a6b766

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

kernel/trace/trace_kprobe.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ static struct trace_probe *alloc_trace_probe(const char *group,
651651
void *addr,
652652
const char *symbol,
653653
unsigned long offs,
654-
int nargs, int is_return)
654+
int nargs, bool is_return)
655655
{
656656
struct trace_probe *tp;
657657
int ret = -ENOMEM;
@@ -944,7 +944,7 @@ static int split_symbol_offset(char *symbol, unsigned long *offset)
944944
#define PARAM_MAX_STACK (THREAD_SIZE / sizeof(unsigned long))
945945

946946
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)
948948
{
949949
int ret = 0;
950950
unsigned long param;
@@ -977,7 +977,7 @@ static int parse_probe_vars(char *arg, const struct fetch_type *t,
977977

978978
/* Recursive argument parser */
979979
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)
981981
{
982982
int ret = 0;
983983
unsigned long param;
@@ -1089,7 +1089,7 @@ static int __parse_bitfield_probe_arg(const char *bf,
10891089

10901090
/* String length checking wrapper */
10911091
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)
10931093
{
10941094
const char *t;
10951095
int ret;
@@ -1162,7 +1162,7 @@ static int create_trace_probe(int argc, char **argv)
11621162
*/
11631163
struct trace_probe *tp;
11641164
int i, ret = 0;
1165-
int is_return = 0, is_delete = 0;
1165+
bool is_return = false, is_delete = false;
11661166
char *symbol = NULL, *event = NULL, *group = NULL;
11671167
char *arg;
11681168
unsigned long offset = 0;
@@ -1171,11 +1171,11 @@ static int create_trace_probe(int argc, char **argv)
11711171

11721172
/* argc must be >= 1 */
11731173
if (argv[0][0] == 'p')
1174-
is_return = 0;
1174+
is_return = false;
11751175
else if (argv[0][0] == 'r')
1176-
is_return = 1;
1176+
is_return = true;
11771177
else if (argv[0][0] == '-')
1178-
is_delete = 1;
1178+
is_delete = true;
11791179
else {
11801180
pr_info("Probe definition must be started with 'p', 'r' or"
11811181
" '-'.\n");

0 commit comments

Comments
 (0)