Commit 4bf39a94 authored by Ingo Molnar's avatar Ingo Molnar Committed by Thomas Gleixner

ftrace: cleanups

no code changed.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent d4c5a2f5
...@@ -756,9 +756,11 @@ ftrace_avail_open(struct inode *inode, struct file *file) ...@@ -756,9 +756,11 @@ ftrace_avail_open(struct inode *inode, struct file *file)
ret = seq_open(file, &show_ftrace_seq_ops); ret = seq_open(file, &show_ftrace_seq_ops);
if (!ret) { if (!ret) {
struct seq_file *m = file->private_data; struct seq_file *m = file->private_data;
m->private = iter; m->private = iter;
} else } else {
kfree(iter); kfree(iter);
}
return ret; return ret;
} }
...@@ -770,6 +772,7 @@ int ftrace_avail_release(struct inode *inode, struct file *file) ...@@ -770,6 +772,7 @@ int ftrace_avail_release(struct inode *inode, struct file *file)
seq_release(inode, file); seq_release(inode, file);
kfree(iter); kfree(iter);
return 0; return 0;
} }
......
...@@ -1245,10 +1245,10 @@ static int s_show(struct seq_file *m, void *v) ...@@ -1245,10 +1245,10 @@ static int s_show(struct seq_file *m, void *v)
} }
static struct seq_operations tracer_seq_ops = { static struct seq_operations tracer_seq_ops = {
.start = s_start, .start = s_start,
.next = s_next, .next = s_next,
.stop = s_stop, .stop = s_stop,
.show = s_show, .show = s_show,
}; };
static struct trace_iterator notrace * static struct trace_iterator notrace *
...@@ -1397,10 +1397,10 @@ static int t_show(struct seq_file *m, void *v) ...@@ -1397,10 +1397,10 @@ static int t_show(struct seq_file *m, void *v)
} }
static struct seq_operations show_traces_seq_ops = { static struct seq_operations show_traces_seq_ops = {
.start = t_start, .start = t_start,
.next = t_next, .next = t_next,
.stop = t_stop, .stop = t_stop,
.show = t_show, .show = t_show,
}; };
static int show_traces_open(struct inode *inode, struct file *file) static int show_traces_open(struct inode *inode, struct file *file)
...@@ -1420,17 +1420,17 @@ static int show_traces_open(struct inode *inode, struct file *file) ...@@ -1420,17 +1420,17 @@ static int show_traces_open(struct inode *inode, struct file *file)
} }
static struct file_operations tracing_fops = { static struct file_operations tracing_fops = {
.open = tracing_open, .open = tracing_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = tracing_release, .release = tracing_release,
}; };
static struct file_operations tracing_lt_fops = { static struct file_operations tracing_lt_fops = {
.open = tracing_lt_open, .open = tracing_lt_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = tracing_release, .release = tracing_release,
}; };
static struct file_operations show_traces_fops = { static struct file_operations show_traces_fops = {
...@@ -1620,8 +1620,7 @@ tracing_set_trace_read(struct file *filp, char __user *ubuf, ...@@ -1620,8 +1620,7 @@ tracing_set_trace_read(struct file *filp, char __user *ubuf,
r = sprintf(buf, "\n"); r = sprintf(buf, "\n");
mutex_unlock(&trace_types_lock); mutex_unlock(&trace_types_lock);
return simple_read_from_buffer(ubuf, cnt, ppos, return simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
buf, r);
} }
static ssize_t static ssize_t
...@@ -1680,8 +1679,7 @@ tracing_max_lat_read(struct file *filp, char __user *ubuf, ...@@ -1680,8 +1679,7 @@ tracing_max_lat_read(struct file *filp, char __user *ubuf,
*ptr == (unsigned long)-1 ? -1 : nsecs_to_usecs(*ptr)); *ptr == (unsigned long)-1 ? -1 : nsecs_to_usecs(*ptr));
if (r > 64) if (r > 64)
r = 64; r = 64;
return simple_read_from_buffer(ubuf, cnt, ppos, return simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
buf, r);
} }
static ssize_t static ssize_t
...@@ -1891,27 +1889,27 @@ tracing_read_pipe(struct file *filp, char __user *ubuf, ...@@ -1891,27 +1889,27 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
} }
static struct file_operations tracing_max_lat_fops = { static struct file_operations tracing_max_lat_fops = {
.open = tracing_open_generic, .open = tracing_open_generic,
.read = tracing_max_lat_read, .read = tracing_max_lat_read,
.write = tracing_max_lat_write, .write = tracing_max_lat_write,
}; };
static struct file_operations tracing_ctrl_fops = { static struct file_operations tracing_ctrl_fops = {
.open = tracing_open_generic, .open = tracing_open_generic,
.read = tracing_ctrl_read, .read = tracing_ctrl_read,
.write = tracing_ctrl_write, .write = tracing_ctrl_write,
}; };
static struct file_operations set_tracer_fops = { static struct file_operations set_tracer_fops = {
.open = tracing_open_generic, .open = tracing_open_generic,
.read = tracing_set_trace_read, .read = tracing_set_trace_read,
.write = tracing_set_trace_write, .write = tracing_set_trace_write,
}; };
static struct file_operations tracing_pipe_fops = { static struct file_operations tracing_pipe_fops = {
.open = tracing_open_pipe, .open = tracing_open_pipe,
.read = tracing_read_pipe, .read = tracing_read_pipe,
.release = tracing_release_pipe, .release = tracing_release_pipe,
}; };
#ifdef CONFIG_DYNAMIC_FTRACE #ifdef CONFIG_DYNAMIC_FTRACE
...@@ -1925,13 +1923,13 @@ tracing_read_long(struct file *filp, char __user *ubuf, ...@@ -1925,13 +1923,13 @@ tracing_read_long(struct file *filp, char __user *ubuf,
int r; int r;
r = sprintf(buf, "%ld\n", *p); r = sprintf(buf, "%ld\n", *p);
return simple_read_from_buffer(ubuf, cnt, ppos,
buf, r); return simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
} }
static struct file_operations tracing_read_long_fops = { static struct file_operations tracing_read_long_fops = {
.open = tracing_open_generic, .open = tracing_open_generic,
.read = tracing_read_long, .read = tracing_read_long,
}; };
#endif #endif
...@@ -2033,7 +2031,7 @@ static __init void tracer_init_debugfs(void) ...@@ -2033,7 +2031,7 @@ static __init void tracer_init_debugfs(void)
/* dummy trace to disable tracing */ /* dummy trace to disable tracing */
static struct tracer no_tracer __read_mostly = static struct tracer no_tracer __read_mostly =
{ {
.name = "none", .name = "none",
}; };
static int trace_alloc_page(void) static int trace_alloc_page(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment