diff options
author | Jan Engelhardt <jengelh@computergmbh.de> | 2008-02-08 07:21:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 12:22:38 -0500 |
commit | 03a44825be987d720df854f63b2f7bd30e46bdde (patch) | |
tree | 6ac01a425ff2201db972fd3b836efc9b0ab6eaec /fs/proc | |
parent | ec26e11740cdff8c3c8330ea235478704ffb4a71 (diff) |
procfs: constify function pointer tables
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Acked-By: David Howells <dhowells@redhat.com>
Acked-by: Bryan Wu <bryan.wu@analog.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/base.c | 4 | ||||
-rw-r--r-- | fs/proc/nommu.c | 2 | ||||
-rw-r--r-- | fs/proc/proc_misc.c | 22 | ||||
-rw-r--r-- | fs/proc/proc_sysctl.c | 4 | ||||
-rw-r--r-- | fs/proc/proc_tty.c | 2 | ||||
-rw-r--r-- | fs/proc/task_mmu.c | 8 | ||||
-rw-r--r-- | fs/proc/task_nommu.c | 2 |
7 files changed, 22 insertions, 22 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index de07e959ff2f..a0c4ba6c6e57 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -506,7 +506,7 @@ static const struct inode_operations proc_def_inode_operations = { | |||
506 | .setattr = proc_setattr, | 506 | .setattr = proc_setattr, |
507 | }; | 507 | }; |
508 | 508 | ||
509 | extern struct seq_operations mounts_op; | 509 | extern const struct seq_operations mounts_op; |
510 | struct proc_mounts { | 510 | struct proc_mounts { |
511 | struct seq_file m; | 511 | struct seq_file m; |
512 | int event; | 512 | int event; |
@@ -585,7 +585,7 @@ static const struct file_operations proc_mounts_operations = { | |||
585 | .poll = mounts_poll, | 585 | .poll = mounts_poll, |
586 | }; | 586 | }; |
587 | 587 | ||
588 | extern struct seq_operations mountstats_op; | 588 | extern const struct seq_operations mountstats_op; |
589 | static int mountstats_open(struct inode *inode, struct file *file) | 589 | static int mountstats_open(struct inode *inode, struct file *file) |
590 | { | 590 | { |
591 | int ret = seq_open(file, &mountstats_op); | 591 | int ret = seq_open(file, &mountstats_op); |
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c index 22f789de3909..5d9147b9d738 100644 --- a/fs/proc/nommu.c +++ b/fs/proc/nommu.c | |||
@@ -116,7 +116,7 @@ static void *nommu_vma_list_next(struct seq_file *m, void *v, loff_t *pos) | |||
116 | return rb_next((struct rb_node *) v); | 116 | return rb_next((struct rb_node *) v); |
117 | } | 117 | } |
118 | 118 | ||
119 | static struct seq_operations proc_nommu_vma_list_seqop = { | 119 | static const struct seq_operations proc_nommu_vma_list_seqop = { |
120 | .start = nommu_vma_list_start, | 120 | .start = nommu_vma_list_start, |
121 | .next = nommu_vma_list_next, | 121 | .next = nommu_vma_list_next, |
122 | .stop = nommu_vma_list_stop, | 122 | .stop = nommu_vma_list_stop, |
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 2686592dbcb2..468805d40e2b 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
@@ -222,7 +222,7 @@ static int meminfo_read_proc(char *page, char **start, off_t off, | |||
222 | #undef K | 222 | #undef K |
223 | } | 223 | } |
224 | 224 | ||
225 | extern struct seq_operations fragmentation_op; | 225 | extern const struct seq_operations fragmentation_op; |
226 | static int fragmentation_open(struct inode *inode, struct file *file) | 226 | static int fragmentation_open(struct inode *inode, struct file *file) |
227 | { | 227 | { |
228 | (void)inode; | 228 | (void)inode; |
@@ -236,7 +236,7 @@ static const struct file_operations fragmentation_file_operations = { | |||
236 | .release = seq_release, | 236 | .release = seq_release, |
237 | }; | 237 | }; |
238 | 238 | ||
239 | extern struct seq_operations pagetypeinfo_op; | 239 | extern const struct seq_operations pagetypeinfo_op; |
240 | static int pagetypeinfo_open(struct inode *inode, struct file *file) | 240 | static int pagetypeinfo_open(struct inode *inode, struct file *file) |
241 | { | 241 | { |
242 | return seq_open(file, &pagetypeinfo_op); | 242 | return seq_open(file, &pagetypeinfo_op); |
@@ -249,7 +249,7 @@ static const struct file_operations pagetypeinfo_file_ops = { | |||
249 | .release = seq_release, | 249 | .release = seq_release, |
250 | }; | 250 | }; |
251 | 251 | ||
252 | extern struct seq_operations zoneinfo_op; | 252 | extern const struct seq_operations zoneinfo_op; |
253 | static int zoneinfo_open(struct inode *inode, struct file *file) | 253 | static int zoneinfo_open(struct inode *inode, struct file *file) |
254 | { | 254 | { |
255 | return seq_open(file, &zoneinfo_op); | 255 | return seq_open(file, &zoneinfo_op); |
@@ -274,7 +274,7 @@ static int version_read_proc(char *page, char **start, off_t off, | |||
274 | return proc_calc_metrics(page, start, off, count, eof, len); | 274 | return proc_calc_metrics(page, start, off, count, eof, len); |
275 | } | 275 | } |
276 | 276 | ||
277 | extern struct seq_operations cpuinfo_op; | 277 | extern const struct seq_operations cpuinfo_op; |
278 | static int cpuinfo_open(struct inode *inode, struct file *file) | 278 | static int cpuinfo_open(struct inode *inode, struct file *file) |
279 | { | 279 | { |
280 | return seq_open(file, &cpuinfo_op); | 280 | return seq_open(file, &cpuinfo_op); |
@@ -327,7 +327,7 @@ static void devinfo_stop(struct seq_file *f, void *v) | |||
327 | /* Nothing to do */ | 327 | /* Nothing to do */ |
328 | } | 328 | } |
329 | 329 | ||
330 | static struct seq_operations devinfo_ops = { | 330 | static const struct seq_operations devinfo_ops = { |
331 | .start = devinfo_start, | 331 | .start = devinfo_start, |
332 | .next = devinfo_next, | 332 | .next = devinfo_next, |
333 | .stop = devinfo_stop, | 333 | .stop = devinfo_stop, |
@@ -346,7 +346,7 @@ static const struct file_operations proc_devinfo_operations = { | |||
346 | .release = seq_release, | 346 | .release = seq_release, |
347 | }; | 347 | }; |
348 | 348 | ||
349 | extern struct seq_operations vmstat_op; | 349 | extern const struct seq_operations vmstat_op; |
350 | static int vmstat_open(struct inode *inode, struct file *file) | 350 | static int vmstat_open(struct inode *inode, struct file *file) |
351 | { | 351 | { |
352 | return seq_open(file, &vmstat_op); | 352 | return seq_open(file, &vmstat_op); |
@@ -377,7 +377,7 @@ static int stram_read_proc(char *page, char **start, off_t off, | |||
377 | #endif | 377 | #endif |
378 | 378 | ||
379 | #ifdef CONFIG_BLOCK | 379 | #ifdef CONFIG_BLOCK |
380 | extern struct seq_operations partitions_op; | 380 | extern const struct seq_operations partitions_op; |
381 | static int partitions_open(struct inode *inode, struct file *file) | 381 | static int partitions_open(struct inode *inode, struct file *file) |
382 | { | 382 | { |
383 | return seq_open(file, &partitions_op); | 383 | return seq_open(file, &partitions_op); |
@@ -389,7 +389,7 @@ static const struct file_operations proc_partitions_operations = { | |||
389 | .release = seq_release, | 389 | .release = seq_release, |
390 | }; | 390 | }; |
391 | 391 | ||
392 | extern struct seq_operations diskstats_op; | 392 | extern const struct seq_operations diskstats_op; |
393 | static int diskstats_open(struct inode *inode, struct file *file) | 393 | static int diskstats_open(struct inode *inode, struct file *file) |
394 | { | 394 | { |
395 | return seq_open(file, &diskstats_op); | 395 | return seq_open(file, &diskstats_op); |
@@ -403,7 +403,7 @@ static const struct file_operations proc_diskstats_operations = { | |||
403 | #endif | 403 | #endif |
404 | 404 | ||
405 | #ifdef CONFIG_MODULES | 405 | #ifdef CONFIG_MODULES |
406 | extern struct seq_operations modules_op; | 406 | extern const struct seq_operations modules_op; |
407 | static int modules_open(struct inode *inode, struct file *file) | 407 | static int modules_open(struct inode *inode, struct file *file) |
408 | { | 408 | { |
409 | return seq_open(file, &modules_op); | 409 | return seq_open(file, &modules_op); |
@@ -430,7 +430,7 @@ static const struct file_operations proc_slabinfo_operations = { | |||
430 | }; | 430 | }; |
431 | 431 | ||
432 | #ifdef CONFIG_DEBUG_SLAB_LEAK | 432 | #ifdef CONFIG_DEBUG_SLAB_LEAK |
433 | extern struct seq_operations slabstats_op; | 433 | extern const struct seq_operations slabstats_op; |
434 | static int slabstats_open(struct inode *inode, struct file *file) | 434 | static int slabstats_open(struct inode *inode, struct file *file) |
435 | { | 435 | { |
436 | unsigned long *n = kzalloc(PAGE_SIZE, GFP_KERNEL); | 436 | unsigned long *n = kzalloc(PAGE_SIZE, GFP_KERNEL); |
@@ -604,7 +604,7 @@ static void int_seq_stop(struct seq_file *f, void *v) | |||
604 | } | 604 | } |
605 | 605 | ||
606 | 606 | ||
607 | static struct seq_operations int_seq_ops = { | 607 | static const struct seq_operations int_seq_ops = { |
608 | .start = int_seq_start, | 608 | .start = int_seq_start, |
609 | .next = int_seq_next, | 609 | .next = int_seq_next, |
610 | .stop = int_seq_stop, | 610 | .stop = int_seq_stop, |
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 4e57fcf85982..b9cb23c08f63 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | static struct dentry_operations proc_sys_dentry_operations; | 10 | static struct dentry_operations proc_sys_dentry_operations; |
11 | static const struct file_operations proc_sys_file_operations; | 11 | static const struct file_operations proc_sys_file_operations; |
12 | static struct inode_operations proc_sys_inode_operations; | 12 | static const struct inode_operations proc_sys_inode_operations; |
13 | 13 | ||
14 | static void proc_sys_refresh_inode(struct inode *inode, struct ctl_table *table) | 14 | static void proc_sys_refresh_inode(struct inode *inode, struct ctl_table *table) |
15 | { | 15 | { |
@@ -446,7 +446,7 @@ static const struct file_operations proc_sys_file_operations = { | |||
446 | .readdir = proc_sys_readdir, | 446 | .readdir = proc_sys_readdir, |
447 | }; | 447 | }; |
448 | 448 | ||
449 | static struct inode_operations proc_sys_inode_operations = { | 449 | static const struct inode_operations proc_sys_inode_operations = { |
450 | .lookup = proc_sys_lookup, | 450 | .lookup = proc_sys_lookup, |
451 | .permission = proc_sys_permission, | 451 | .permission = proc_sys_permission, |
452 | .setattr = proc_sys_setattr, | 452 | .setattr = proc_sys_setattr, |
diff --git a/fs/proc/proc_tty.c b/fs/proc/proc_tty.c index 34296839b417..49816e00b51a 100644 --- a/fs/proc/proc_tty.c +++ b/fs/proc/proc_tty.c | |||
@@ -117,7 +117,7 @@ static void t_stop(struct seq_file *m, void *v) | |||
117 | mutex_unlock(&tty_mutex); | 117 | mutex_unlock(&tty_mutex); |
118 | } | 118 | } |
119 | 119 | ||
120 | static struct seq_operations tty_drivers_op = { | 120 | static const struct seq_operations tty_drivers_op = { |
121 | .start = t_start, | 121 | .start = t_start, |
122 | .next = t_next, | 122 | .next = t_next, |
123 | .stop = t_stop, | 123 | .stop = t_stop, |
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index a34c440f8d25..ae4d3f2c8cb2 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -216,7 +216,7 @@ static void m_stop(struct seq_file *m, void *v) | |||
216 | } | 216 | } |
217 | 217 | ||
218 | static int do_maps_open(struct inode *inode, struct file *file, | 218 | static int do_maps_open(struct inode *inode, struct file *file, |
219 | struct seq_operations *ops) | 219 | const struct seq_operations *ops) |
220 | { | 220 | { |
221 | struct proc_maps_private *priv; | 221 | struct proc_maps_private *priv; |
222 | int ret = -ENOMEM; | 222 | int ret = -ENOMEM; |
@@ -299,7 +299,7 @@ static int show_map(struct seq_file *m, void *v) | |||
299 | return 0; | 299 | return 0; |
300 | } | 300 | } |
301 | 301 | ||
302 | static struct seq_operations proc_pid_maps_op = { | 302 | static const struct seq_operations proc_pid_maps_op = { |
303 | .start = m_start, | 303 | .start = m_start, |
304 | .next = m_next, | 304 | .next = m_next, |
305 | .stop = m_stop, | 305 | .stop = m_stop, |
@@ -434,7 +434,7 @@ static int show_smap(struct seq_file *m, void *v) | |||
434 | return ret; | 434 | return ret; |
435 | } | 435 | } |
436 | 436 | ||
437 | static struct seq_operations proc_pid_smaps_op = { | 437 | static const struct seq_operations proc_pid_smaps_op = { |
438 | .start = m_start, | 438 | .start = m_start, |
439 | .next = m_next, | 439 | .next = m_next, |
440 | .stop = m_stop, | 440 | .stop = m_stop, |
@@ -734,7 +734,7 @@ static int show_numa_map_checked(struct seq_file *m, void *v) | |||
734 | return show_numa_map(m, v); | 734 | return show_numa_map(m, v); |
735 | } | 735 | } |
736 | 736 | ||
737 | static struct seq_operations proc_pid_numa_maps_op = { | 737 | static const struct seq_operations proc_pid_numa_maps_op = { |
738 | .start = m_start, | 738 | .start = m_start, |
739 | .next = m_next, | 739 | .next = m_next, |
740 | .stop = m_stop, | 740 | .stop = m_stop, |
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c index cee0231c6cec..abfc6f5e56ca 100644 --- a/fs/proc/task_nommu.c +++ b/fs/proc/task_nommu.c | |||
@@ -198,7 +198,7 @@ static void *m_next(struct seq_file *m, void *_vml, loff_t *pos) | |||
198 | return vml ? vml->next : NULL; | 198 | return vml ? vml->next : NULL; |
199 | } | 199 | } |
200 | 200 | ||
201 | static struct seq_operations proc_pid_maps_ops = { | 201 | static const struct seq_operations proc_pid_maps_ops = { |
202 | .start = m_start, | 202 | .start = m_start, |
203 | .next = m_next, | 203 | .next = m_next, |
204 | .stop = m_stop, | 204 | .stop = m_stop, |