aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2006-12-06 23:40:36 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:46 -0500
commit15ad7cdcfd76450d4beebc789ec646664238184d (patch)
tree279d05a76ae0906c23ee2de8c5684d95d9886ad3
parent4a08a9f68168e547c2baf100020e9b96cae5fbd1 (diff)
[PATCH] struct seq_operations and struct file_operations constification
- move some file_operations structs into the .rodata section - move static strings from policy_types[] array into the .rodata section - fix generic seq_operations usages, so that those structs may be defined as "const" as well [akpm@osdl.org: couple of fixes] Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--fs/seq_file.c4
-rw-r--r--include/linux/cpuset.h2
-rw-r--r--include/linux/mmzone.h2
-rw-r--r--include/linux/relay.h2
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/linux/seq_file.h4
-rw-r--r--kernel/configs.c2
-rw-r--r--kernel/cpuset.c4
-rw-r--r--kernel/dma.c2
-rw-r--r--kernel/futex.c2
-rw-r--r--kernel/kallsyms.c4
-rw-r--r--kernel/lockdep_proc.c6
-rw-r--r--kernel/module.c2
-rw-r--r--kernel/power/user.c2
-rw-r--r--kernel/profile.c2
-rw-r--r--kernel/relay.c2
-rw-r--r--kernel/resource.c6
-rw-r--r--kernel/sched.c2
-rw-r--r--kernel/sysctl.c2
-rw-r--r--mm/mempolicy.c4
-rw-r--r--mm/page_alloc.c2
-rw-r--r--mm/shmem.c4
-rw-r--r--mm/slab.c4
-rw-r--r--mm/swapfile.c4
-rw-r--r--mm/vmstat.c8
25 files changed, 40 insertions, 40 deletions
diff --git a/fs/seq_file.c b/fs/seq_file.c
index 555b9ac04c25..10690aa401c7 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -26,7 +26,7 @@
26 * ERR_PTR(error). In the end of sequence they return %NULL. ->show() 26 * ERR_PTR(error). In the end of sequence they return %NULL. ->show()
27 * returns 0 in case of success and negative number in case of error. 27 * returns 0 in case of success and negative number in case of error.
28 */ 28 */
29int seq_open(struct file *file, struct seq_operations *op) 29int seq_open(struct file *file, const struct seq_operations *op)
30{ 30{
31 struct seq_file *p = file->private_data; 31 struct seq_file *p = file->private_data;
32 32
@@ -408,7 +408,7 @@ EXPORT_SYMBOL(single_open);
408 408
409int single_release(struct inode *inode, struct file *file) 409int single_release(struct inode *inode, struct file *file)
410{ 410{
411 struct seq_operations *op = ((struct seq_file *)file->private_data)->op; 411 const struct seq_operations *op = ((struct seq_file *)file->private_data)->op;
412 int res = seq_release(inode, file); 412 int res = seq_release(inode, file);
413 kfree(op); 413 kfree(op);
414 return res; 414 return res;
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index 748d2c996631..8821e1f75b44 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -46,7 +46,7 @@ extern int cpuset_excl_nodes_overlap(const struct task_struct *p);
46extern int cpuset_memory_pressure_enabled; 46extern int cpuset_memory_pressure_enabled;
47extern void __cpuset_memory_pressure_bump(void); 47extern void __cpuset_memory_pressure_bump(void);
48 48
49extern struct file_operations proc_cpuset_operations; 49extern const struct file_operations proc_cpuset_operations;
50extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); 50extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer);
51 51
52extern void cpuset_lock(void); 52extern void cpuset_lock(void);
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index da6002dec205..e339a7345f25 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -278,7 +278,7 @@ struct zone {
278 /* 278 /*
279 * rarely used fields: 279 * rarely used fields:
280 */ 280 */
281 char *name; 281 const char *name;
282} ____cacheline_internodealigned_in_smp; 282} ____cacheline_internodealigned_in_smp;
283 283
284/* 284/*
diff --git a/include/linux/relay.h b/include/linux/relay.h
index 0e3d91b76996..c6a48bfc8b14 100644
--- a/include/linux/relay.h
+++ b/include/linux/relay.h
@@ -274,7 +274,7 @@ static inline void subbuf_start_reserve(struct rchan_buf *buf,
274/* 274/*
275 * exported relay file operations, kernel/relay.c 275 * exported relay file operations, kernel/relay.c
276 */ 276 */
277extern struct file_operations relay_file_operations; 277extern const struct file_operations relay_file_operations;
278 278
279#endif /* _LINUX_RELAY_H */ 279#endif /* _LINUX_RELAY_H */
280 280
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 3a767242e72f..dede82c63445 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -573,7 +573,7 @@ struct sched_info {
573#endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */ 573#endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */
574 574
575#ifdef CONFIG_SCHEDSTATS 575#ifdef CONFIG_SCHEDSTATS
576extern struct file_operations proc_schedstat_operations; 576extern const struct file_operations proc_schedstat_operations;
577#endif /* CONFIG_SCHEDSTATS */ 577#endif /* CONFIG_SCHEDSTATS */
578 578
579#ifdef CONFIG_TASK_DELAY_ACCT 579#ifdef CONFIG_TASK_DELAY_ACCT
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index b95f6eb7254c..3e3cccbb1cac 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -20,7 +20,7 @@ struct seq_file {
20 loff_t index; 20 loff_t index;
21 loff_t version; 21 loff_t version;
22 struct mutex lock; 22 struct mutex lock;
23 struct seq_operations *op; 23 const struct seq_operations *op;
24 void *private; 24 void *private;
25}; 25};
26 26
@@ -31,7 +31,7 @@ struct seq_operations {
31 int (*show) (struct seq_file *m, void *v); 31 int (*show) (struct seq_file *m, void *v);
32}; 32};
33 33
34int seq_open(struct file *, struct seq_operations *); 34int seq_open(struct file *, const struct seq_operations *);
35ssize_t seq_read(struct file *, char __user *, size_t, loff_t *); 35ssize_t seq_read(struct file *, char __user *, size_t, loff_t *);
36loff_t seq_lseek(struct file *, loff_t, int); 36loff_t seq_lseek(struct file *, loff_t, int);
37int seq_release(struct inode *, struct file *); 37int seq_release(struct inode *, struct file *);
diff --git a/kernel/configs.c b/kernel/configs.c
index f9e31974f4ad..8fa1fb28f8a7 100644
--- a/kernel/configs.c
+++ b/kernel/configs.c
@@ -75,7 +75,7 @@ ikconfig_read_current(struct file *file, char __user *buf,
75 return count; 75 return count;
76} 76}
77 77
78static struct file_operations ikconfig_file_ops = { 78static const struct file_operations ikconfig_file_ops = {
79 .owner = THIS_MODULE, 79 .owner = THIS_MODULE,
80 .read = ikconfig_read_current, 80 .read = ikconfig_read_current,
81}; 81};
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 9b62b4c03ad0..4ef1d29297ca 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1531,7 +1531,7 @@ static int cpuset_rename(struct inode *old_dir, struct dentry *old_dentry,
1531 return simple_rename(old_dir, old_dentry, new_dir, new_dentry); 1531 return simple_rename(old_dir, old_dentry, new_dir, new_dentry);
1532} 1532}
1533 1533
1534static struct file_operations cpuset_file_operations = { 1534static const struct file_operations cpuset_file_operations = {
1535 .read = cpuset_file_read, 1535 .read = cpuset_file_read,
1536 .write = cpuset_file_write, 1536 .write = cpuset_file_write,
1537 .llseek = generic_file_llseek, 1537 .llseek = generic_file_llseek,
@@ -2605,7 +2605,7 @@ static int cpuset_open(struct inode *inode, struct file *file)
2605 return single_open(file, proc_cpuset_show, pid); 2605 return single_open(file, proc_cpuset_show, pid);
2606} 2606}
2607 2607
2608struct file_operations proc_cpuset_operations = { 2608const struct file_operations proc_cpuset_operations = {
2609 .open = cpuset_open, 2609 .open = cpuset_open,
2610 .read = seq_read, 2610 .read = seq_read,
2611 .llseek = seq_lseek, 2611 .llseek = seq_lseek,
diff --git a/kernel/dma.c b/kernel/dma.c
index 2020644c938a..937b13ca33ba 100644
--- a/kernel/dma.c
+++ b/kernel/dma.c
@@ -140,7 +140,7 @@ static int proc_dma_open(struct inode *inode, struct file *file)
140 return single_open(file, proc_dma_show, NULL); 140 return single_open(file, proc_dma_show, NULL);
141} 141}
142 142
143static struct file_operations proc_dma_operations = { 143static const struct file_operations proc_dma_operations = {
144 .open = proc_dma_open, 144 .open = proc_dma_open,
145 .read = seq_read, 145 .read = seq_read,
146 .llseek = seq_lseek, 146 .llseek = seq_lseek,
diff --git a/kernel/futex.c b/kernel/futex.c
index a8302a1620ea..95989a3b4168 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1492,7 +1492,7 @@ static unsigned int futex_poll(struct file *filp,
1492 return ret; 1492 return ret;
1493} 1493}
1494 1494
1495static struct file_operations futex_fops = { 1495static const struct file_operations futex_fops = {
1496 .release = futex_close, 1496 .release = futex_close,
1497 .poll = futex_poll, 1497 .poll = futex_poll,
1498}; 1498};
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index 54befe36ee0b..ab63cfc42992 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -398,7 +398,7 @@ static int s_show(struct seq_file *m, void *p)
398 return 0; 398 return 0;
399} 399}
400 400
401static struct seq_operations kallsyms_op = { 401static const struct seq_operations kallsyms_op = {
402 .start = s_start, 402 .start = s_start,
403 .next = s_next, 403 .next = s_next,
404 .stop = s_stop, 404 .stop = s_stop,
@@ -433,7 +433,7 @@ static int kallsyms_release(struct inode *inode, struct file *file)
433 return seq_release(inode, file); 433 return seq_release(inode, file);
434} 434}
435 435
436static struct file_operations kallsyms_operations = { 436static const struct file_operations kallsyms_operations = {
437 .open = kallsyms_open, 437 .open = kallsyms_open,
438 .read = seq_read, 438 .read = seq_read,
439 .llseek = seq_lseek, 439 .llseek = seq_lseek,
diff --git a/kernel/lockdep_proc.c b/kernel/lockdep_proc.c
index f6e72eaab3fa..b554b40a4aa6 100644
--- a/kernel/lockdep_proc.c
+++ b/kernel/lockdep_proc.c
@@ -113,7 +113,7 @@ static int l_show(struct seq_file *m, void *v)
113 return 0; 113 return 0;
114} 114}
115 115
116static struct seq_operations lockdep_ops = { 116static const struct seq_operations lockdep_ops = {
117 .start = l_start, 117 .start = l_start,
118 .next = l_next, 118 .next = l_next,
119 .stop = l_stop, 119 .stop = l_stop,
@@ -135,7 +135,7 @@ static int lockdep_open(struct inode *inode, struct file *file)
135 return res; 135 return res;
136} 136}
137 137
138static struct file_operations proc_lockdep_operations = { 138static const struct file_operations proc_lockdep_operations = {
139 .open = lockdep_open, 139 .open = lockdep_open,
140 .read = seq_read, 140 .read = seq_read,
141 .llseek = seq_lseek, 141 .llseek = seq_lseek,
@@ -319,7 +319,7 @@ static int lockdep_stats_open(struct inode *inode, struct file *file)
319 return single_open(file, lockdep_stats_show, NULL); 319 return single_open(file, lockdep_stats_show, NULL);
320} 320}
321 321
322static struct file_operations proc_lockdep_stats_operations = { 322static const struct file_operations proc_lockdep_stats_operations = {
323 .open = lockdep_stats_open, 323 .open = lockdep_stats_open,
324 .read = seq_read, 324 .read = seq_read,
325 .llseek = seq_lseek, 325 .llseek = seq_lseek,
diff --git a/kernel/module.c b/kernel/module.c
index e2d09d604ca0..d9eae45d0145 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2209,7 +2209,7 @@ static int m_show(struct seq_file *m, void *p)
2209 Where refcount is a number or -, and deps is a comma-separated list 2209 Where refcount is a number or -, and deps is a comma-separated list
2210 of depends or -. 2210 of depends or -.
2211*/ 2211*/
2212struct seq_operations modules_op = { 2212const struct seq_operations modules_op = {
2213 .start = m_start, 2213 .start = m_start,
2214 .next = m_next, 2214 .next = m_next,
2215 .stop = m_stop, 2215 .stop = m_stop,
diff --git a/kernel/power/user.c b/kernel/power/user.c
index 069732e5695c..89443b85163b 100644
--- a/kernel/power/user.c
+++ b/kernel/power/user.c
@@ -383,7 +383,7 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
383 return error; 383 return error;
384} 384}
385 385
386static struct file_operations snapshot_fops = { 386static const struct file_operations snapshot_fops = {
387 .open = snapshot_open, 387 .open = snapshot_open,
388 .release = snapshot_release, 388 .release = snapshot_release,
389 .read = snapshot_read, 389 .read = snapshot_read,
diff --git a/kernel/profile.c b/kernel/profile.c
index 0961d93e1d91..fb5e03d57e9d 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -501,7 +501,7 @@ static ssize_t write_profile(struct file *file, const char __user *buf,
501 return count; 501 return count;
502} 502}
503 503
504static struct file_operations proc_profile_operations = { 504static const struct file_operations proc_profile_operations = {
505 .read = read_profile, 505 .read = read_profile,
506 .write = write_profile, 506 .write = write_profile,
507}; 507};
diff --git a/kernel/relay.c b/kernel/relay.c
index 2b92e8ece85b..75a3a9a7efc2 100644
--- a/kernel/relay.c
+++ b/kernel/relay.c
@@ -1013,7 +1013,7 @@ static ssize_t relay_file_sendfile(struct file *filp,
1013 actor, &desc); 1013 actor, &desc);
1014} 1014}
1015 1015
1016struct file_operations relay_file_operations = { 1016const struct file_operations relay_file_operations = {
1017 .open = relay_file_open, 1017 .open = relay_file_open,
1018 .poll = relay_file_poll, 1018 .poll = relay_file_poll,
1019 .mmap = relay_file_mmap, 1019 .mmap = relay_file_mmap,
diff --git a/kernel/resource.c b/kernel/resource.c
index 6de60c12143e..7b9a497419d9 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -88,7 +88,7 @@ static int r_show(struct seq_file *m, void *v)
88 return 0; 88 return 0;
89} 89}
90 90
91static struct seq_operations resource_op = { 91static const struct seq_operations resource_op = {
92 .start = r_start, 92 .start = r_start,
93 .next = r_next, 93 .next = r_next,
94 .stop = r_stop, 94 .stop = r_stop,
@@ -115,14 +115,14 @@ static int iomem_open(struct inode *inode, struct file *file)
115 return res; 115 return res;
116} 116}
117 117
118static struct file_operations proc_ioports_operations = { 118static const struct file_operations proc_ioports_operations = {
119 .open = ioports_open, 119 .open = ioports_open,
120 .read = seq_read, 120 .read = seq_read,
121 .llseek = seq_lseek, 121 .llseek = seq_lseek,
122 .release = seq_release, 122 .release = seq_release,
123}; 123};
124 124
125static struct file_operations proc_iomem_operations = { 125static const struct file_operations proc_iomem_operations = {
126 .open = iomem_open, 126 .open = iomem_open,
127 .read = seq_read, 127 .read = seq_read,
128 .llseek = seq_lseek, 128 .llseek = seq_lseek,
diff --git a/kernel/sched.c b/kernel/sched.c
index b43cef02ce5b..f385eff4682d 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -505,7 +505,7 @@ static int schedstat_open(struct inode *inode, struct file *file)
505 return res; 505 return res;
506} 506}
507 507
508struct file_operations proc_schedstat_operations = { 508const struct file_operations proc_schedstat_operations = {
509 .open = schedstat_open, 509 .open = schedstat_open,
510 .read = seq_read, 510 .read = seq_read,
511 .llseek = seq_lseek, 511 .llseek = seq_lseek,
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 6d7147cf66bb..758dbbf972a5 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -170,7 +170,7 @@ static ssize_t proc_readsys(struct file *, char __user *, size_t, loff_t *);
170static ssize_t proc_writesys(struct file *, const char __user *, size_t, loff_t *); 170static ssize_t proc_writesys(struct file *, const char __user *, size_t, loff_t *);
171static int proc_opensys(struct inode *, struct file *); 171static int proc_opensys(struct inode *, struct file *);
172 172
173struct file_operations proc_sys_file_operations = { 173const struct file_operations proc_sys_file_operations = {
174 .open = proc_opensys, 174 .open = proc_opensys,
175 .read = proc_readsys, 175 .read = proc_readsys,
176 .write = proc_writesys, 176 .write = proc_writesys,
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index ad864f8708b0..b917d6fdc1bb 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -1707,8 +1707,8 @@ void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new)
1707 * Display pages allocated per node and memory policy via /proc. 1707 * Display pages allocated per node and memory policy via /proc.
1708 */ 1708 */
1709 1709
1710static const char *policy_types[] = { "default", "prefer", "bind", 1710static const char * const policy_types[] =
1711 "interleave" }; 1711 { "default", "prefer", "bind", "interleave" };
1712 1712
1713/* 1713/*
1714 * Convert a mempolicy into a string. 1714 * Convert a mempolicy into a string.
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 27ec7a1b8022..cace22b3ac25 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -83,7 +83,7 @@ int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = {
83 83
84EXPORT_SYMBOL(totalram_pages); 84EXPORT_SYMBOL(totalram_pages);
85 85
86static char *zone_names[MAX_NR_ZONES] = { 86static char * const zone_names[MAX_NR_ZONES] = {
87 "DMA", 87 "DMA",
88#ifdef CONFIG_ZONE_DMA32 88#ifdef CONFIG_ZONE_DMA32
89 "DMA32", 89 "DMA32",
diff --git a/mm/shmem.c b/mm/shmem.c
index 007653680a75..c820b4f77b8d 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -177,7 +177,7 @@ static inline void shmem_unacct_blocks(unsigned long flags, long pages)
177 177
178static struct super_operations shmem_ops; 178static struct super_operations shmem_ops;
179static const struct address_space_operations shmem_aops; 179static const struct address_space_operations shmem_aops;
180static struct file_operations shmem_file_operations; 180static const struct file_operations shmem_file_operations;
181static struct inode_operations shmem_inode_operations; 181static struct inode_operations shmem_inode_operations;
182static struct inode_operations shmem_dir_inode_operations; 182static struct inode_operations shmem_dir_inode_operations;
183static struct inode_operations shmem_special_inode_operations; 183static struct inode_operations shmem_special_inode_operations;
@@ -2319,7 +2319,7 @@ static const struct address_space_operations shmem_aops = {
2319 .migratepage = migrate_page, 2319 .migratepage = migrate_page,
2320}; 2320};
2321 2321
2322static struct file_operations shmem_file_operations = { 2322static const struct file_operations shmem_file_operations = {
2323 .mmap = shmem_mmap, 2323 .mmap = shmem_mmap,
2324#ifdef CONFIG_TMPFS 2324#ifdef CONFIG_TMPFS
2325 .llseek = generic_file_llseek, 2325 .llseek = generic_file_llseek,
diff --git a/mm/slab.c b/mm/slab.c
index 86f5d6e995bb..068cb4503c15 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -4142,7 +4142,7 @@ static int s_show(struct seq_file *m, void *p)
4142 * + further values on SMP and with statistics enabled 4142 * + further values on SMP and with statistics enabled
4143 */ 4143 */
4144 4144
4145struct seq_operations slabinfo_op = { 4145const struct seq_operations slabinfo_op = {
4146 .start = s_start, 4146 .start = s_start,
4147 .next = s_next, 4147 .next = s_next,
4148 .stop = s_stop, 4148 .stop = s_stop,
@@ -4340,7 +4340,7 @@ static int leaks_show(struct seq_file *m, void *p)
4340 return 0; 4340 return 0;
4341} 4341}
4342 4342
4343struct seq_operations slabstats_op = { 4343const struct seq_operations slabstats_op = {
4344 .start = leaks_start, 4344 .start = leaks_start,
4345 .next = s_next, 4345 .next = s_next,
4346 .stop = s_stop, 4346 .stop = s_stop,
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 55242363de64..c5431072f422 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -1368,7 +1368,7 @@ static int swap_show(struct seq_file *swap, void *v)
1368 return 0; 1368 return 0;
1369} 1369}
1370 1370
1371static struct seq_operations swaps_op = { 1371static const struct seq_operations swaps_op = {
1372 .start = swap_start, 1372 .start = swap_start,
1373 .next = swap_next, 1373 .next = swap_next,
1374 .stop = swap_stop, 1374 .stop = swap_stop,
@@ -1380,7 +1380,7 @@ static int swaps_open(struct inode *inode, struct file *file)
1380 return seq_open(file, &swaps_op); 1380 return seq_open(file, &swaps_op);
1381} 1381}
1382 1382
1383static struct file_operations proc_swaps_operations = { 1383static const struct file_operations proc_swaps_operations = {
1384 .open = swaps_open, 1384 .open = swaps_open,
1385 .read = seq_read, 1385 .read = seq_read,
1386 .llseek = seq_lseek, 1386 .llseek = seq_lseek,
diff --git a/mm/vmstat.c b/mm/vmstat.c
index ef4176843d9e..dc005a0c96ae 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -430,7 +430,7 @@ static int frag_show(struct seq_file *m, void *arg)
430 return 0; 430 return 0;
431} 431}
432 432
433struct seq_operations fragmentation_op = { 433const struct seq_operations fragmentation_op = {
434 .start = frag_start, 434 .start = frag_start,
435 .next = frag_next, 435 .next = frag_next,
436 .stop = frag_stop, 436 .stop = frag_stop,
@@ -452,7 +452,7 @@ struct seq_operations fragmentation_op = {
452#define TEXTS_FOR_ZONES(xx) xx "_dma", TEXT_FOR_DMA32(xx) xx "_normal", \ 452#define TEXTS_FOR_ZONES(xx) xx "_dma", TEXT_FOR_DMA32(xx) xx "_normal", \
453 TEXT_FOR_HIGHMEM(xx) 453 TEXT_FOR_HIGHMEM(xx)
454 454
455static char *vmstat_text[] = { 455static const char * const vmstat_text[] = {
456 /* Zoned VM counters */ 456 /* Zoned VM counters */
457 "nr_anon_pages", 457 "nr_anon_pages",
458 "nr_mapped", 458 "nr_mapped",
@@ -597,7 +597,7 @@ static int zoneinfo_show(struct seq_file *m, void *arg)
597 return 0; 597 return 0;
598} 598}
599 599
600struct seq_operations zoneinfo_op = { 600const struct seq_operations zoneinfo_op = {
601 .start = frag_start, /* iterate over all zones. The same as in 601 .start = frag_start, /* iterate over all zones. The same as in
602 * fragmentation. */ 602 * fragmentation. */
603 .next = frag_next, 603 .next = frag_next,
@@ -660,7 +660,7 @@ static void vmstat_stop(struct seq_file *m, void *arg)
660 m->private = NULL; 660 m->private = NULL;
661} 661}
662 662
663struct seq_operations vmstat_op = { 663const struct seq_operations vmstat_op = {
664 .start = vmstat_start, 664 .start = vmstat_start,
665 .next = vmstat_next, 665 .next = vmstat_next,
666 .stop = vmstat_stop, 666 .stop = vmstat_stop,