diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-05-12 15:20:46 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-23 14:42:20 -0400 |
commit | 4bf39a9411a4ce8712954e03a9bd1592ee345919 (patch) | |
tree | 044694f1c69ec2588e4b60e6b60701bae2a53e81 /kernel/trace/trace.c | |
parent | d4c5a2f5870939d837293de87b41dda0012a4572 (diff) |
ftrace: cleanups
no code changed.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 72 |
1 files changed, 35 insertions, 37 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index b3811ca74071..4550afda9607 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -1245,10 +1245,10 @@ static int s_show(struct seq_file *m, void *v) | |||
1245 | } | 1245 | } |
1246 | 1246 | ||
1247 | static struct seq_operations tracer_seq_ops = { | 1247 | static struct seq_operations tracer_seq_ops = { |
1248 | .start = s_start, | 1248 | .start = s_start, |
1249 | .next = s_next, | 1249 | .next = s_next, |
1250 | .stop = s_stop, | 1250 | .stop = s_stop, |
1251 | .show = s_show, | 1251 | .show = s_show, |
1252 | }; | 1252 | }; |
1253 | 1253 | ||
1254 | static struct trace_iterator notrace * | 1254 | static struct trace_iterator notrace * |
@@ -1397,10 +1397,10 @@ static int t_show(struct seq_file *m, void *v) | |||
1397 | } | 1397 | } |
1398 | 1398 | ||
1399 | static struct seq_operations show_traces_seq_ops = { | 1399 | static struct seq_operations show_traces_seq_ops = { |
1400 | .start = t_start, | 1400 | .start = t_start, |
1401 | .next = t_next, | 1401 | .next = t_next, |
1402 | .stop = t_stop, | 1402 | .stop = t_stop, |
1403 | .show = t_show, | 1403 | .show = t_show, |
1404 | }; | 1404 | }; |
1405 | 1405 | ||
1406 | static int show_traces_open(struct inode *inode, struct file *file) | 1406 | 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 | } | 1420 | } |
1421 | 1421 | ||
1422 | static struct file_operations tracing_fops = { | 1422 | static struct file_operations tracing_fops = { |
1423 | .open = tracing_open, | 1423 | .open = tracing_open, |
1424 | .read = seq_read, | 1424 | .read = seq_read, |
1425 | .llseek = seq_lseek, | 1425 | .llseek = seq_lseek, |
1426 | .release = tracing_release, | 1426 | .release = tracing_release, |
1427 | }; | 1427 | }; |
1428 | 1428 | ||
1429 | static struct file_operations tracing_lt_fops = { | 1429 | static struct file_operations tracing_lt_fops = { |
1430 | .open = tracing_lt_open, | 1430 | .open = tracing_lt_open, |
1431 | .read = seq_read, | 1431 | .read = seq_read, |
1432 | .llseek = seq_lseek, | 1432 | .llseek = seq_lseek, |
1433 | .release = tracing_release, | 1433 | .release = tracing_release, |
1434 | }; | 1434 | }; |
1435 | 1435 | ||
1436 | static struct file_operations show_traces_fops = { | 1436 | static struct file_operations show_traces_fops = { |
@@ -1620,8 +1620,7 @@ tracing_set_trace_read(struct file *filp, char __user *ubuf, | |||
1620 | r = sprintf(buf, "\n"); | 1620 | r = sprintf(buf, "\n"); |
1621 | mutex_unlock(&trace_types_lock); | 1621 | mutex_unlock(&trace_types_lock); |
1622 | 1622 | ||
1623 | return simple_read_from_buffer(ubuf, cnt, ppos, | 1623 | return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); |
1624 | buf, r); | ||
1625 | } | 1624 | } |
1626 | 1625 | ||
1627 | static ssize_t | 1626 | static ssize_t |
@@ -1680,8 +1679,7 @@ tracing_max_lat_read(struct file *filp, char __user *ubuf, | |||
1680 | *ptr == (unsigned long)-1 ? -1 : nsecs_to_usecs(*ptr)); | 1679 | *ptr == (unsigned long)-1 ? -1 : nsecs_to_usecs(*ptr)); |
1681 | if (r > 64) | 1680 | if (r > 64) |
1682 | r = 64; | 1681 | r = 64; |
1683 | return simple_read_from_buffer(ubuf, cnt, ppos, | 1682 | return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); |
1684 | buf, r); | ||
1685 | } | 1683 | } |
1686 | 1684 | ||
1687 | static ssize_t | 1685 | static ssize_t |
@@ -1891,27 +1889,27 @@ tracing_read_pipe(struct file *filp, char __user *ubuf, | |||
1891 | } | 1889 | } |
1892 | 1890 | ||
1893 | static struct file_operations tracing_max_lat_fops = { | 1891 | static struct file_operations tracing_max_lat_fops = { |
1894 | .open = tracing_open_generic, | 1892 | .open = tracing_open_generic, |
1895 | .read = tracing_max_lat_read, | 1893 | .read = tracing_max_lat_read, |
1896 | .write = tracing_max_lat_write, | 1894 | .write = tracing_max_lat_write, |
1897 | }; | 1895 | }; |
1898 | 1896 | ||
1899 | static struct file_operations tracing_ctrl_fops = { | 1897 | static struct file_operations tracing_ctrl_fops = { |
1900 | .open = tracing_open_generic, | 1898 | .open = tracing_open_generic, |
1901 | .read = tracing_ctrl_read, | 1899 | .read = tracing_ctrl_read, |
1902 | .write = tracing_ctrl_write, | 1900 | .write = tracing_ctrl_write, |
1903 | }; | 1901 | }; |
1904 | 1902 | ||
1905 | static struct file_operations set_tracer_fops = { | 1903 | static struct file_operations set_tracer_fops = { |
1906 | .open = tracing_open_generic, | 1904 | .open = tracing_open_generic, |
1907 | .read = tracing_set_trace_read, | 1905 | .read = tracing_set_trace_read, |
1908 | .write = tracing_set_trace_write, | 1906 | .write = tracing_set_trace_write, |
1909 | }; | 1907 | }; |
1910 | 1908 | ||
1911 | static struct file_operations tracing_pipe_fops = { | 1909 | static struct file_operations tracing_pipe_fops = { |
1912 | .open = tracing_open_pipe, | 1910 | .open = tracing_open_pipe, |
1913 | .read = tracing_read_pipe, | 1911 | .read = tracing_read_pipe, |
1914 | .release = tracing_release_pipe, | 1912 | .release = tracing_release_pipe, |
1915 | }; | 1913 | }; |
1916 | 1914 | ||
1917 | #ifdef CONFIG_DYNAMIC_FTRACE | 1915 | #ifdef CONFIG_DYNAMIC_FTRACE |
@@ -1925,13 +1923,13 @@ tracing_read_long(struct file *filp, char __user *ubuf, | |||
1925 | int r; | 1923 | int r; |
1926 | 1924 | ||
1927 | r = sprintf(buf, "%ld\n", *p); | 1925 | r = sprintf(buf, "%ld\n", *p); |
1928 | return simple_read_from_buffer(ubuf, cnt, ppos, | 1926 | |
1929 | buf, r); | 1927 | return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); |
1930 | } | 1928 | } |
1931 | 1929 | ||
1932 | static struct file_operations tracing_read_long_fops = { | 1930 | static struct file_operations tracing_read_long_fops = { |
1933 | .open = tracing_open_generic, | 1931 | .open = tracing_open_generic, |
1934 | .read = tracing_read_long, | 1932 | .read = tracing_read_long, |
1935 | }; | 1933 | }; |
1936 | #endif | 1934 | #endif |
1937 | 1935 | ||
@@ -2033,7 +2031,7 @@ static __init void tracer_init_debugfs(void) | |||
2033 | /* dummy trace to disable tracing */ | 2031 | /* dummy trace to disable tracing */ |
2034 | static struct tracer no_tracer __read_mostly = | 2032 | static struct tracer no_tracer __read_mostly = |
2035 | { | 2033 | { |
2036 | .name = "none", | 2034 | .name = "none", |
2037 | }; | 2035 | }; |
2038 | 2036 | ||
2039 | static int trace_alloc_page(void) | 2037 | static int trace_alloc_page(void) |