diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-03-05 21:44:55 -0500 |
---|---|---|
committer | Steven Rostedt <srostedt@redhat.com> | 2009-03-05 21:46:40 -0500 |
commit | 5e2336a0d47c9661a40cc5ef85135ce1406af6e8 (patch) | |
tree | 6d977e4471f8e31245602a26e939368689d2383a | |
parent | 2002c258faaa8f89543df284fdbaa9e4b171547f (diff) |
tracing: make all file_operations const
Impact: cleanup
All file_operations structures should be constant. No one is going to
change them.
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
-rw-r--r-- | kernel/trace/ftrace.c | 10 | ||||
-rw-r--r-- | kernel/trace/ring_buffer.c | 2 | ||||
-rw-r--r-- | kernel/trace/trace.c | 24 | ||||
-rw-r--r-- | kernel/trace/trace_sysprof.c | 2 |
4 files changed, 19 insertions, 19 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 5a3a06b21eee..d7a06a0d9447 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -1869,21 +1869,21 @@ ftrace_notrace_release(struct inode *inode, struct file *file) | |||
1869 | return ftrace_regex_release(inode, file, 0); | 1869 | return ftrace_regex_release(inode, file, 0); |
1870 | } | 1870 | } |
1871 | 1871 | ||
1872 | static struct file_operations ftrace_avail_fops = { | 1872 | static const struct file_operations ftrace_avail_fops = { |
1873 | .open = ftrace_avail_open, | 1873 | .open = ftrace_avail_open, |
1874 | .read = seq_read, | 1874 | .read = seq_read, |
1875 | .llseek = seq_lseek, | 1875 | .llseek = seq_lseek, |
1876 | .release = ftrace_avail_release, | 1876 | .release = ftrace_avail_release, |
1877 | }; | 1877 | }; |
1878 | 1878 | ||
1879 | static struct file_operations ftrace_failures_fops = { | 1879 | static const struct file_operations ftrace_failures_fops = { |
1880 | .open = ftrace_failures_open, | 1880 | .open = ftrace_failures_open, |
1881 | .read = seq_read, | 1881 | .read = seq_read, |
1882 | .llseek = seq_lseek, | 1882 | .llseek = seq_lseek, |
1883 | .release = ftrace_avail_release, | 1883 | .release = ftrace_avail_release, |
1884 | }; | 1884 | }; |
1885 | 1885 | ||
1886 | static struct file_operations ftrace_filter_fops = { | 1886 | static const struct file_operations ftrace_filter_fops = { |
1887 | .open = ftrace_filter_open, | 1887 | .open = ftrace_filter_open, |
1888 | .read = ftrace_regex_read, | 1888 | .read = ftrace_regex_read, |
1889 | .write = ftrace_filter_write, | 1889 | .write = ftrace_filter_write, |
@@ -1891,7 +1891,7 @@ static struct file_operations ftrace_filter_fops = { | |||
1891 | .release = ftrace_filter_release, | 1891 | .release = ftrace_filter_release, |
1892 | }; | 1892 | }; |
1893 | 1893 | ||
1894 | static struct file_operations ftrace_notrace_fops = { | 1894 | static const struct file_operations ftrace_notrace_fops = { |
1895 | .open = ftrace_notrace_open, | 1895 | .open = ftrace_notrace_open, |
1896 | .read = ftrace_regex_read, | 1896 | .read = ftrace_regex_read, |
1897 | .write = ftrace_notrace_write, | 1897 | .write = ftrace_notrace_write, |
@@ -2423,7 +2423,7 @@ ftrace_pid_write(struct file *filp, const char __user *ubuf, | |||
2423 | return cnt; | 2423 | return cnt; |
2424 | } | 2424 | } |
2425 | 2425 | ||
2426 | static struct file_operations ftrace_pid_fops = { | 2426 | static const struct file_operations ftrace_pid_fops = { |
2427 | .read = ftrace_pid_read, | 2427 | .read = ftrace_pid_read, |
2428 | .write = ftrace_pid_write, | 2428 | .write = ftrace_pid_write, |
2429 | }; | 2429 | }; |
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index f7473645b9c6..178858492a89 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -2606,7 +2606,7 @@ rb_simple_write(struct file *filp, const char __user *ubuf, | |||
2606 | return cnt; | 2606 | return cnt; |
2607 | } | 2607 | } |
2608 | 2608 | ||
2609 | static struct file_operations rb_simple_fops = { | 2609 | static const struct file_operations rb_simple_fops = { |
2610 | .open = tracing_open_generic, | 2610 | .open = tracing_open_generic, |
2611 | .read = rb_simple_read, | 2611 | .read = rb_simple_read, |
2612 | .write = rb_simple_write, | 2612 | .write = rb_simple_write, |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index c0e9c1263393..e6144acf2b75 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -1882,14 +1882,14 @@ static int show_traces_open(struct inode *inode, struct file *file) | |||
1882 | return ret; | 1882 | return ret; |
1883 | } | 1883 | } |
1884 | 1884 | ||
1885 | static struct file_operations tracing_fops = { | 1885 | static const struct file_operations tracing_fops = { |
1886 | .open = tracing_open, | 1886 | .open = tracing_open, |
1887 | .read = seq_read, | 1887 | .read = seq_read, |
1888 | .llseek = seq_lseek, | 1888 | .llseek = seq_lseek, |
1889 | .release = tracing_release, | 1889 | .release = tracing_release, |
1890 | }; | 1890 | }; |
1891 | 1891 | ||
1892 | static struct file_operations show_traces_fops = { | 1892 | static const struct file_operations show_traces_fops = { |
1893 | .open = show_traces_open, | 1893 | .open = show_traces_open, |
1894 | .read = seq_read, | 1894 | .read = seq_read, |
1895 | .release = seq_release, | 1895 | .release = seq_release, |
@@ -1982,7 +1982,7 @@ err_unlock: | |||
1982 | return err; | 1982 | return err; |
1983 | } | 1983 | } |
1984 | 1984 | ||
1985 | static struct file_operations tracing_cpumask_fops = { | 1985 | static const struct file_operations tracing_cpumask_fops = { |
1986 | .open = tracing_open_generic, | 1986 | .open = tracing_open_generic, |
1987 | .read = tracing_cpumask_read, | 1987 | .read = tracing_cpumask_read, |
1988 | .write = tracing_cpumask_write, | 1988 | .write = tracing_cpumask_write, |
@@ -2134,7 +2134,7 @@ tracing_trace_options_write(struct file *filp, const char __user *ubuf, | |||
2134 | return cnt; | 2134 | return cnt; |
2135 | } | 2135 | } |
2136 | 2136 | ||
2137 | static struct file_operations tracing_iter_fops = { | 2137 | static const struct file_operations tracing_iter_fops = { |
2138 | .open = tracing_open_generic, | 2138 | .open = tracing_open_generic, |
2139 | .read = tracing_trace_options_read, | 2139 | .read = tracing_trace_options_read, |
2140 | .write = tracing_trace_options_write, | 2140 | .write = tracing_trace_options_write, |
@@ -2167,7 +2167,7 @@ tracing_readme_read(struct file *filp, char __user *ubuf, | |||
2167 | readme_msg, strlen(readme_msg)); | 2167 | readme_msg, strlen(readme_msg)); |
2168 | } | 2168 | } |
2169 | 2169 | ||
2170 | static struct file_operations tracing_readme_fops = { | 2170 | static const struct file_operations tracing_readme_fops = { |
2171 | .open = tracing_open_generic, | 2171 | .open = tracing_open_generic, |
2172 | .read = tracing_readme_read, | 2172 | .read = tracing_readme_read, |
2173 | }; | 2173 | }; |
@@ -2927,25 +2927,25 @@ tracing_mark_write(struct file *filp, const char __user *ubuf, | |||
2927 | return cnt; | 2927 | return cnt; |
2928 | } | 2928 | } |
2929 | 2929 | ||
2930 | static struct file_operations tracing_max_lat_fops = { | 2930 | static const struct file_operations tracing_max_lat_fops = { |
2931 | .open = tracing_open_generic, | 2931 | .open = tracing_open_generic, |
2932 | .read = tracing_max_lat_read, | 2932 | .read = tracing_max_lat_read, |
2933 | .write = tracing_max_lat_write, | 2933 | .write = tracing_max_lat_write, |
2934 | }; | 2934 | }; |
2935 | 2935 | ||
2936 | static struct file_operations tracing_ctrl_fops = { | 2936 | static const struct file_operations tracing_ctrl_fops = { |
2937 | .open = tracing_open_generic, | 2937 | .open = tracing_open_generic, |
2938 | .read = tracing_ctrl_read, | 2938 | .read = tracing_ctrl_read, |
2939 | .write = tracing_ctrl_write, | 2939 | .write = tracing_ctrl_write, |
2940 | }; | 2940 | }; |
2941 | 2941 | ||
2942 | static struct file_operations set_tracer_fops = { | 2942 | static const struct file_operations set_tracer_fops = { |
2943 | .open = tracing_open_generic, | 2943 | .open = tracing_open_generic, |
2944 | .read = tracing_set_trace_read, | 2944 | .read = tracing_set_trace_read, |
2945 | .write = tracing_set_trace_write, | 2945 | .write = tracing_set_trace_write, |
2946 | }; | 2946 | }; |
2947 | 2947 | ||
2948 | static struct file_operations tracing_pipe_fops = { | 2948 | static const struct file_operations tracing_pipe_fops = { |
2949 | .open = tracing_open_pipe, | 2949 | .open = tracing_open_pipe, |
2950 | .poll = tracing_poll_pipe, | 2950 | .poll = tracing_poll_pipe, |
2951 | .read = tracing_read_pipe, | 2951 | .read = tracing_read_pipe, |
@@ -2953,13 +2953,13 @@ static struct file_operations tracing_pipe_fops = { | |||
2953 | .release = tracing_release_pipe, | 2953 | .release = tracing_release_pipe, |
2954 | }; | 2954 | }; |
2955 | 2955 | ||
2956 | static struct file_operations tracing_entries_fops = { | 2956 | static const struct file_operations tracing_entries_fops = { |
2957 | .open = tracing_open_generic, | 2957 | .open = tracing_open_generic, |
2958 | .read = tracing_entries_read, | 2958 | .read = tracing_entries_read, |
2959 | .write = tracing_entries_write, | 2959 | .write = tracing_entries_write, |
2960 | }; | 2960 | }; |
2961 | 2961 | ||
2962 | static struct file_operations tracing_mark_fops = { | 2962 | static const struct file_operations tracing_mark_fops = { |
2963 | .open = tracing_open_generic, | 2963 | .open = tracing_open_generic, |
2964 | .write = tracing_mark_write, | 2964 | .write = tracing_mark_write, |
2965 | }; | 2965 | }; |
@@ -3240,7 +3240,7 @@ tracing_read_dyn_info(struct file *filp, char __user *ubuf, | |||
3240 | return r; | 3240 | return r; |
3241 | } | 3241 | } |
3242 | 3242 | ||
3243 | static struct file_operations tracing_dyn_info_fops = { | 3243 | static const struct file_operations tracing_dyn_info_fops = { |
3244 | .open = tracing_open_generic, | 3244 | .open = tracing_open_generic, |
3245 | .read = tracing_read_dyn_info, | 3245 | .read = tracing_read_dyn_info, |
3246 | }; | 3246 | }; |
diff --git a/kernel/trace/trace_sysprof.c b/kernel/trace/trace_sysprof.c index c771af4e8f1a..91fd19c2149f 100644 --- a/kernel/trace/trace_sysprof.c +++ b/kernel/trace/trace_sysprof.c | |||
@@ -314,7 +314,7 @@ sysprof_sample_write(struct file *filp, const char __user *ubuf, | |||
314 | return cnt; | 314 | return cnt; |
315 | } | 315 | } |
316 | 316 | ||
317 | static struct file_operations sysprof_sample_fops = { | 317 | static const struct file_operations sysprof_sample_fops = { |
318 | .read = sysprof_sample_read, | 318 | .read = sysprof_sample_read, |
319 | .write = sysprof_sample_write, | 319 | .write = sysprof_sample_write, |
320 | }; | 320 | }; |