diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index 4e71ebb4ed494ee5b64f85ca0167859af444eb6b..a449e999027c8e663af133f956996c94a70197fc 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c @@ -1471,7 +1471,7 @@ c_stop(struct seq_file *f, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { .start = c_start, .next = c_next, .stop = c_stop, diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 6e106b3d7729f2f8832107babf496d69ed6c4c91..289ea9d7fcdbb72763cb17b0136061ffefb0c3f3 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -700,7 +700,7 @@ static void c_stop(struct seq_file *m, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { .start = c_start, .next = c_next, .stop = c_stop, diff --git a/arch/cris/kernel/setup.c b/arch/cris/kernel/setup.c index 4da042e100a0ab3a61b22eb069a8013a04a92b1b..c34fb235b09f9214e243a44005ef42bbc555ac30 100644 --- a/arch/cris/kernel/setup.c +++ b/arch/cris/kernel/setup.c @@ -180,7 +180,7 @@ static void c_stop(struct seq_file *m, void *v) extern int show_cpuinfo(struct seq_file *m, void *v); -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { .start = c_start, .next = c_next, .stop = c_stop, diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c index 6c01464db699419a2b5e8068325c1791ad356188..0669e13823831d5b994ac6daa439bd346f8943b1 100644 --- a/arch/frv/kernel/setup.c +++ b/arch/frv/kernel/setup.c @@ -1113,7 +1113,7 @@ static void c_stop(struct seq_file *m, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { .start = c_start, .next = c_next, .stop = c_stop, diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c index cd3734614d9df93cd21787e4adca354ef2a8ecc6..b1f25c20a5dbdb8f6c1a2c4a29e61546499ce3e7 100644 --- a/arch/h8300/kernel/setup.c +++ b/arch/h8300/kernel/setup.c @@ -236,7 +236,7 @@ static void c_stop(struct seq_file *m, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { .start = c_start, .next = c_next, .stop = c_stop, diff --git a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c index f1f5db0c40846b3b39e65368996dea3c80a952b7..0392112a5d702cd2859245967a7357640bada5e9 100644 --- a/arch/m32r/kernel/setup.c +++ b/arch/m32r/kernel/setup.c @@ -369,7 +369,7 @@ static void c_stop(struct seq_file *m, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { .start = c_start, .next = c_next, .stop = c_stop, diff --git a/arch/m68k/kernel/setup.c b/arch/m68k/kernel/setup.c index 9a06c48edcb3c47468a0db8163d116eaaa9d032c..bba650312fd9fa65ac73d3408017cee1e3fb2dce 100644 --- a/arch/m68k/kernel/setup.c +++ b/arch/m68k/kernel/setup.c @@ -450,7 +450,7 @@ static void *c_next(struct seq_file *m, void *v, loff_t *pos) static void c_stop(struct seq_file *m, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { .start = c_start, .next = c_next, .stop = c_stop, diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c index 156c6c662c7e87fa3feabf82cc83c6b9c10e6e7e..d6f0200316febaa7f8f1fb76c09c0b96e91b0ad1 100644 --- a/arch/m68knommu/kernel/setup.c +++ b/arch/m68knommu/kernel/setup.c @@ -260,7 +260,7 @@ static void c_stop(struct seq_file *m, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { .start = c_start, .next = c_next, .stop = c_stop, diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c index c44b8c51f5d1ef82f542f8f35e56d7fb2d9ec7a3..39e7c5a5946a8981deee1afa1296efc7cff9eadc 100644 --- a/arch/parisc/kernel/setup.c +++ b/arch/parisc/kernel/setup.c @@ -190,7 +190,7 @@ c_stop (struct seq_file *m, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { .start = c_start, .next = c_next, .stop = c_stop, diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c index d51368d72e390c6faaf40956b82f208b12be2c74..294055902f0c16b73a3635e0bbb44fdc2749d1ab 100644 --- a/arch/ppc/kernel/setup.c +++ b/arch/ppc/kernel/setup.c @@ -275,7 +275,7 @@ static void c_stop(struct seq_file *m, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { .start =c_start, .next = c_next, .stop = c_stop, diff --git a/arch/v850/kernel/procfs.c b/arch/v850/kernel/procfs.c index e6f9d060ad5bb7e40b799e21a64a2be55585b6b0..e433cde789b4d24dba12582d20f501f71fd03dc7 100644 --- a/arch/v850/kernel/procfs.c +++ b/arch/v850/kernel/procfs.c @@ -59,7 +59,7 @@ static void cpuinfo_stop (struct seq_file *m, void *v) { } -struct seq_operations cpuinfo_op = { +const struct seq_operations cpuinfo_op = { .start = cpuinfo_start, .next = cpuinfo_next, .stop = cpuinfo_stop, diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 2e8d398cf19627aef6db11a8e6d723ae7b106fa7..b80f2cb1b4fb1c9883473c8dae6d63261874fb15 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -469,7 +469,7 @@ c_stop(struct seq_file *f, void *v) { } -struct seq_operations cpuinfo_op = +const struct seq_operations cpuinfo_op = { start: c_start, next: c_next, diff --git a/fs/proc/base.c b/fs/proc/base.c index de07e959ff2f9e24c409f758c1d1981a8771ad06..a0c4ba6c6e578f83c6ee70dd4dbf73a78bd5f002 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -506,7 +506,7 @@ static const struct inode_operations proc_def_inode_operations = { .setattr = proc_setattr, }; -extern struct seq_operations mounts_op; +extern const struct seq_operations mounts_op; struct proc_mounts { struct seq_file m; int event; @@ -585,7 +585,7 @@ static const struct file_operations proc_mounts_operations = { .poll = mounts_poll, }; -extern struct seq_operations mountstats_op; +extern const struct seq_operations mountstats_op; static int mountstats_open(struct inode *inode, struct file *file) { int ret = seq_open(file, &mountstats_op); diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c index 22f789de390941797102693a7a80c635a7f381ce..5d9147b9d7380c35a4610de862f12ca4503a2c8a 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) return rb_next((struct rb_node *) v); } -static struct seq_operations proc_nommu_vma_list_seqop = { +static const struct seq_operations proc_nommu_vma_list_seqop = { .start = nommu_vma_list_start, .next = nommu_vma_list_next, .stop = nommu_vma_list_stop, diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 2686592dbcb2b01b29108da7587361afce9fa6c3..468805d40e2bdb44daeb43bfccf4a1b5919c7add 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, #undef K } -extern struct seq_operations fragmentation_op; +extern const struct seq_operations fragmentation_op; static int fragmentation_open(struct inode *inode, struct file *file) { (void)inode; @@ -236,7 +236,7 @@ static const struct file_operations fragmentation_file_operations = { .release = seq_release, }; -extern struct seq_operations pagetypeinfo_op; +extern const struct seq_operations pagetypeinfo_op; static int pagetypeinfo_open(struct inode *inode, struct file *file) { return seq_open(file, &pagetypeinfo_op); @@ -249,7 +249,7 @@ static const struct file_operations pagetypeinfo_file_ops = { .release = seq_release, }; -extern struct seq_operations zoneinfo_op; +extern const struct seq_operations zoneinfo_op; static int zoneinfo_open(struct inode *inode, struct file *file) { return seq_open(file, &zoneinfo_op); @@ -274,7 +274,7 @@ static int version_read_proc(char *page, char **start, off_t off, return proc_calc_metrics(page, start, off, count, eof, len); } -extern struct seq_operations cpuinfo_op; +extern const struct seq_operations cpuinfo_op; static int cpuinfo_open(struct inode *inode, struct file *file) { return seq_open(file, &cpuinfo_op); @@ -327,7 +327,7 @@ static void devinfo_stop(struct seq_file *f, void *v) /* Nothing to do */ } -static struct seq_operations devinfo_ops = { +static const struct seq_operations devinfo_ops = { .start = devinfo_start, .next = devinfo_next, .stop = devinfo_stop, @@ -346,7 +346,7 @@ static const struct file_operations proc_devinfo_operations = { .release = seq_release, }; -extern struct seq_operations vmstat_op; +extern const struct seq_operations vmstat_op; static int vmstat_open(struct inode *inode, struct file *file) { return seq_open(file, &vmstat_op); @@ -377,7 +377,7 @@ static int stram_read_proc(char *page, char **start, off_t off, #endif #ifdef CONFIG_BLOCK -extern struct seq_operations partitions_op; +extern const struct seq_operations partitions_op; static int partitions_open(struct inode *inode, struct file *file) { return seq_open(file, &partitions_op); @@ -389,7 +389,7 @@ static const struct file_operations proc_partitions_operations = { .release = seq_release, }; -extern struct seq_operations diskstats_op; +extern const struct seq_operations diskstats_op; static int diskstats_open(struct inode *inode, struct file *file) { return seq_open(file, &diskstats_op); @@ -403,7 +403,7 @@ static const struct file_operations proc_diskstats_operations = { #endif #ifdef CONFIG_MODULES -extern struct seq_operations modules_op; +extern const struct seq_operations modules_op; static int modules_open(struct inode *inode, struct file *file) { return seq_open(file, &modules_op); @@ -430,7 +430,7 @@ static const struct file_operations proc_slabinfo_operations = { }; #ifdef CONFIG_DEBUG_SLAB_LEAK -extern struct seq_operations slabstats_op; +extern const struct seq_operations slabstats_op; static int slabstats_open(struct inode *inode, struct file *file) { unsigned long *n = kzalloc(PAGE_SIZE, GFP_KERNEL); @@ -604,7 +604,7 @@ static void int_seq_stop(struct seq_file *f, void *v) } -static struct seq_operations int_seq_ops = { +static const struct seq_operations int_seq_ops = { .start = int_seq_start, .next = int_seq_next, .stop = int_seq_stop, diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 4e57fcf85982f648ec29f7c0962a1cebae990388..b9cb23c08f631fbafb632cfa0bd1e180712c7443 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -9,7 +9,7 @@ static struct dentry_operations proc_sys_dentry_operations; static const struct file_operations proc_sys_file_operations; -static struct inode_operations proc_sys_inode_operations; +static const struct inode_operations proc_sys_inode_operations; static void proc_sys_refresh_inode(struct inode *inode, struct ctl_table *table) { @@ -446,7 +446,7 @@ static const struct file_operations proc_sys_file_operations = { .readdir = proc_sys_readdir, }; -static struct inode_operations proc_sys_inode_operations = { +static const struct inode_operations proc_sys_inode_operations = { .lookup = proc_sys_lookup, .permission = proc_sys_permission, .setattr = proc_sys_setattr, diff --git a/fs/proc/proc_tty.c b/fs/proc/proc_tty.c index 34296839b417b23759b7376e9bf4497cc3e68757..49816e00b51a25899f860215166b97acd8584044 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) mutex_unlock(&tty_mutex); } -static struct seq_operations tty_drivers_op = { +static const struct seq_operations tty_drivers_op = { .start = t_start, .next = t_next, .stop = t_stop, diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index a34c440f8d2568554f7ce8b6e2b509dcfa4b60c0..ae4d3f2c8cb2dc1b629e3d7e356fb269421fd47d 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) } static int do_maps_open(struct inode *inode, struct file *file, - struct seq_operations *ops) + const struct seq_operations *ops) { struct proc_maps_private *priv; int ret = -ENOMEM; @@ -299,7 +299,7 @@ static int show_map(struct seq_file *m, void *v) return 0; } -static struct seq_operations proc_pid_maps_op = { +static const struct seq_operations proc_pid_maps_op = { .start = m_start, .next = m_next, .stop = m_stop, @@ -434,7 +434,7 @@ static int show_smap(struct seq_file *m, void *v) return ret; } -static struct seq_operations proc_pid_smaps_op = { +static const struct seq_operations proc_pid_smaps_op = { .start = m_start, .next = m_next, .stop = m_stop, @@ -734,7 +734,7 @@ static int show_numa_map_checked(struct seq_file *m, void *v) return show_numa_map(m, v); } -static struct seq_operations proc_pid_numa_maps_op = { +static const struct seq_operations proc_pid_numa_maps_op = { .start = m_start, .next = m_next, .stop = m_stop, diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c index cee0231c6cecf862877e3abf24406c1ca4184d45..abfc6f5e56caa696138ad8c91c22a3d35c32b231 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) return vml ? vml->next : NULL; } -static struct seq_operations proc_pid_maps_ops = { +static const struct seq_operations proc_pid_maps_ops = { .start = m_start, .next = m_next, .stop = m_stop,