aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmstat.c
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 /mm/vmstat.c
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>
Diffstat (limited to 'mm/vmstat.c')
-rw-r--r--mm/vmstat.c8
1 files changed, 4 insertions, 4 deletions
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,