aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/ftrace.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-02-17 11:20:26 -0500
committerSteven Rostedt <srostedt@redhat.com>2009-02-17 11:20:26 -0500
commit6a24a244cd3a02d5b290293c32fcf2c6e92b4235 (patch)
tree8328e5e7da792a07a338f20974eaea4f80bb59ac /kernel/trace/ftrace.c
parent73d3fd96e77745742f3750b7b19ee42204adc210 (diff)
ftrace: clean up coding style
Ingo Molnar pointed out some coding style issues with the recent ftrace updates. This patch cleans them up. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r--kernel/trace/ftrace.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 4e6c87ecf1bf..af9d95c0e4de 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -460,8 +460,8 @@ static void ftrace_bug(int failed, unsigned long ip)
460static int 460static int
461__ftrace_replace_code(struct dyn_ftrace *rec, int enable) 461__ftrace_replace_code(struct dyn_ftrace *rec, int enable)
462{ 462{
463 unsigned long ip, fl;
464 unsigned long ftrace_addr; 463 unsigned long ftrace_addr;
464 unsigned long ip, fl;
465 465
466 ftrace_addr = (unsigned long)FTRACE_ADDR; 466 ftrace_addr = (unsigned long)FTRACE_ADDR;
467 467
@@ -530,9 +530,9 @@ __ftrace_replace_code(struct dyn_ftrace *rec, int enable)
530 530
531static void ftrace_replace_code(int enable) 531static void ftrace_replace_code(int enable)
532{ 532{
533 int failed;
534 struct dyn_ftrace *rec; 533 struct dyn_ftrace *rec;
535 struct ftrace_page *pg; 534 struct ftrace_page *pg;
535 int failed;
536 536
537 do_for_each_ftrace_rec(pg, rec) { 537 do_for_each_ftrace_rec(pg, rec) {
538 /* 538 /*
@@ -1208,14 +1208,15 @@ ftrace_match_record(struct dyn_ftrace *rec, char *regex, int len, int type)
1208 1208
1209static void ftrace_match_records(char *buff, int len, int enable) 1209static void ftrace_match_records(char *buff, int len, int enable)
1210{ 1210{
1211 char *search; 1211 unsigned int search_len;
1212 struct ftrace_page *pg; 1212 struct ftrace_page *pg;
1213 struct dyn_ftrace *rec; 1213 struct dyn_ftrace *rec;
1214 unsigned long flag;
1215 char *search;
1214 int type; 1216 int type;
1215 unsigned long flag = enable ? FTRACE_FL_FILTER : FTRACE_FL_NOTRACE;
1216 unsigned search_len;
1217 int not; 1217 int not;
1218 1218
1219 flag = enable ? FTRACE_FL_FILTER : FTRACE_FL_NOTRACE;
1219 type = ftrace_setup_glob(buff, len, &search, &not); 1220 type = ftrace_setup_glob(buff, len, &search, &not);
1220 1221
1221 search_len = strlen(search); 1222 search_len = strlen(search);
@@ -1263,14 +1264,16 @@ ftrace_match_module_record(struct dyn_ftrace *rec, char *mod,
1263 1264
1264static void ftrace_match_module_records(char *buff, char *mod, int enable) 1265static void ftrace_match_module_records(char *buff, char *mod, int enable)
1265{ 1266{
1266 char *search = buff; 1267 unsigned search_len = 0;
1267 struct ftrace_page *pg; 1268 struct ftrace_page *pg;
1268 struct dyn_ftrace *rec; 1269 struct dyn_ftrace *rec;
1269 int type = MATCH_FULL; 1270 int type = MATCH_FULL;
1270 unsigned long flag = enable ? FTRACE_FL_FILTER : FTRACE_FL_NOTRACE; 1271 char *search = buff;
1271 unsigned search_len = 0; 1272 unsigned long flag;
1272 int not = 0; 1273 int not = 0;
1273 1274
1275 flag = enable ? FTRACE_FL_FILTER : FTRACE_FL_NOTRACE;
1276
1274 /* blank or '*' mean the same */ 1277 /* blank or '*' mean the same */
1275 if (strcmp(buff, "*") == 0) 1278 if (strcmp(buff, "*") == 0)
1276 buff[0] = 0; 1279 buff[0] = 0;
@@ -1442,8 +1445,8 @@ register_ftrace_function_hook(char *glob, struct ftrace_hook_ops *ops,
1442 struct ftrace_func_hook *entry; 1445 struct ftrace_func_hook *entry;
1443 struct ftrace_page *pg; 1446 struct ftrace_page *pg;
1444 struct dyn_ftrace *rec; 1447 struct dyn_ftrace *rec;
1445 unsigned long key;
1446 int type, len, not; 1448 int type, len, not;
1449 unsigned long key;
1447 int count = 0; 1450 int count = 0;
1448 char *search; 1451 char *search;
1449 1452
@@ -1623,8 +1626,8 @@ int unregister_ftrace_command(struct ftrace_func_command *cmd)
1623 1626
1624static int ftrace_process_regex(char *buff, int len, int enable) 1627static int ftrace_process_regex(char *buff, int len, int enable)
1625{ 1628{
1626 struct ftrace_func_command *p;
1627 char *func, *command, *next = buff; 1629 char *func, *command, *next = buff;
1630 struct ftrace_func_command *p;
1628 int ret = -EINVAL; 1631 int ret = -EINVAL;
1629 1632
1630 func = strsep(&next, ":"); 1633 func = strsep(&next, ":");
@@ -2392,7 +2395,6 @@ static __init int ftrace_init_debugfs(void)
2392 "'set_ftrace_pid' entry\n"); 2395 "'set_ftrace_pid' entry\n");
2393 return 0; 2396 return 0;
2394} 2397}
2395
2396fs_initcall(ftrace_init_debugfs); 2398fs_initcall(ftrace_init_debugfs);
2397 2399
2398/** 2400/**