mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[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 [[email protected]: couple of fixes] Signed-off-by: Helge Deller <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
4a08a9f681
commit
15ad7cdcfd
25 changed files with 40 additions and 40 deletions
|
|
@ -430,7 +430,7 @@ static int frag_show(struct seq_file *m, void *arg)
|
|||
return 0;
|
||||
}
|
||||
|
||||
struct seq_operations fragmentation_op = {
|
||||
const struct seq_operations fragmentation_op = {
|
||||
.start = frag_start,
|
||||
.next = frag_next,
|
||||
.stop = frag_stop,
|
||||
|
|
@ -452,7 +452,7 @@ struct seq_operations fragmentation_op = {
|
|||
#define TEXTS_FOR_ZONES(xx) xx "_dma", TEXT_FOR_DMA32(xx) xx "_normal", \
|
||||
TEXT_FOR_HIGHMEM(xx)
|
||||
|
||||
static char *vmstat_text[] = {
|
||||
static const char * const vmstat_text[] = {
|
||||
/* Zoned VM counters */
|
||||
"nr_anon_pages",
|
||||
"nr_mapped",
|
||||
|
|
@ -597,7 +597,7 @@ static int zoneinfo_show(struct seq_file *m, void *arg)
|
|||
return 0;
|
||||
}
|
||||
|
||||
struct seq_operations zoneinfo_op = {
|
||||
const struct seq_operations zoneinfo_op = {
|
||||
.start = frag_start, /* iterate over all zones. The same as in
|
||||
* fragmentation. */
|
||||
.next = frag_next,
|
||||
|
|
@ -660,7 +660,7 @@ static void vmstat_stop(struct seq_file *m, void *arg)
|
|||
m->private = NULL;
|
||||
}
|
||||
|
||||
struct seq_operations vmstat_op = {
|
||||
const struct seq_operations vmstat_op = {
|
||||
.start = vmstat_start,
|
||||
.next = vmstat_next,
|
||||
.stop = vmstat_stop,
|
||||
|
|
|
|||
Loading…
Reference in a new issue