aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-05 21:44:55 -0500
committerSteven Rostedt <srostedt@redhat.com>2009-03-05 21:46:40 -0500
commit5e2336a0d47c9661a40cc5ef85135ce1406af6e8 (patch)
tree6d977e4471f8e31245602a26e939368689d2383a /kernel/trace
parent2002c258faaa8f89543df284fdbaa9e4b171547f (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>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/ftrace.c10
-rw-r--r--kernel/trace/ring_buffer.c2
-rw-r--r--kernel/trace/trace.c24
-rw-r--r--kernel/trace/trace_sysprof.c2
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
1872static struct file_operations ftrace_avail_fops = { 1872static 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
1879static struct file_operations ftrace_failures_fops = { 1879static 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
1886static struct file_operations ftrace_filter_fops = { 1886static 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
1894static struct file_operations ftrace_notrace_fops = { 1894static 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
2426static struct file_operations ftrace_pid_fops = { 2426static 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
2609static struct file_operations rb_simple_fops = { 2609static 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
1885static struct file_operations tracing_fops = { 1885static 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
1892static struct file_operations show_traces_fops = { 1892static 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
1985static struct file_operations tracing_cpumask_fops = { 1985static 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
2137static struct file_operations tracing_iter_fops = { 2137static 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
2170static struct file_operations tracing_readme_fops = { 2170static 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
2930static struct file_operations tracing_max_lat_fops = { 2930static 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
2936static struct file_operations tracing_ctrl_fops = { 2936static 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
2942static struct file_operations set_tracer_fops = { 2942static 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
2948static struct file_operations tracing_pipe_fops = { 2948static 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
2956static struct file_operations tracing_entries_fops = { 2956static 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
2962static struct file_operations tracing_mark_fops = { 2962static 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
3243static struct file_operations tracing_dyn_info_fops = { 3243static 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
317static struct file_operations sysprof_sample_fops = { 317static 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};