linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] procfs: constify function pointer tables
       [not found] <54038cd4f87a03884e4f59f8f3697889dfb63c54.1201030614.git.jengelh@computergmbh.de>
@ 2008-01-22 20:00 ` Jan Engelhardt
  2008-01-22 21:25   ` Geert Uytterhoeven
                     ` (4 more replies)
  2008-01-22 22:57 ` David Howells
  1 sibling, 5 replies; 11+ messages in thread
From: Jan Engelhardt @ 2008-01-22 20:00 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Kernel Mailing List, linux-fsdevel, Ivan Kokshaysky,
	Bryan Wu, Mikael Starvik, David Howells, Hirokazu Takata,
	Geert Uytterhoeven, Roman Zippel, Kyle McMartin, Matthew Wilcox,
	Chris Zankel

Hi,


This touches so many different places that I did not feel like creating 
a miniscule patch for each architecture. I hope that is ok.

===Patch begins===
[PATCH] procfs: constify function pointer tables

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
---
 arch/alpha/kernel/setup.c     |    2 +-
 arch/blackfin/kernel/setup.c  |    2 +-
 arch/cris/kernel/setup.c      |    2 +-
 arch/frv/kernel/setup.c       |    2 +-
 arch/h8300/kernel/setup.c     |    2 +-
 arch/m32r/kernel/setup.c      |    2 +-
 arch/m68k/kernel/setup.c      |    2 +-
 arch/m68knommu/kernel/setup.c |    2 +-
 arch/parisc/kernel/setup.c    |    2 +-
 arch/ppc/kernel/setup.c       |    2 +-
 arch/v850/kernel/procfs.c     |    2 +-
 arch/xtensa/kernel/setup.c    |    2 +-
 fs/proc/base.c                |    6 +++---
 fs/proc/nommu.c               |    2 +-
 fs/proc/proc_misc.c           |   22 +++++++++++-----------
 fs/proc/proc_sysctl.c         |    4 ++--
 fs/proc/proc_tty.c            |    2 +-
 fs/proc/task_mmu.c            |    8 ++++----
 fs/proc/task_nommu.c          |    2 +-
 19 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
index bd5e68c..823f18e 100644
--- a/arch/alpha/kernel/setup.c
+++ b/arch/alpha/kernel/setup.c
@@ -1472,7 +1472,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 d282201..d67cf54 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -691,7 +691,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 65466c4..e42aedd 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 a74c087..582e832 100644
--- a/arch/frv/kernel/setup.c
+++ b/arch/frv/kernel/setup.c
@@ -1109,7 +1109,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 b2e86d0..fb0f809 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 d648143..c815fbe 100644
--- a/arch/m32r/kernel/setup.c
+++ b/arch/m32r/kernel/setup.c
@@ -366,7 +366,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 ed3a4ca..6a8afa9 100644
--- a/arch/m68k/kernel/setup.c
+++ b/arch/m68k/kernel/setup.c
@@ -449,7 +449,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 332345d..001181a 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -263,7 +263,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 c44b8c5..39e7c5a 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 5255bd8..9b38b0b 100644
--- a/arch/ppc/kernel/setup.c
+++ b/arch/ppc/kernel/setup.c
@@ -277,7 +277,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 e6f9d06..e433cde 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 2e8d398..b80f2cb 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 7411bfb..1784c97 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -435,7 +435,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;
@@ -514,7 +514,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);
@@ -895,7 +895,7 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf,
 	return end - buffer;
 }
 
-static struct file_operations proc_clear_refs_operations = {
+static const struct file_operations proc_clear_refs_operations = {
 	.write		= clear_refs_write,
 };
 #endif
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
index 22f789d..5d9147b 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 3462bfd..7315786 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -216,7 +216,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;
@@ -230,7 +230,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);
@@ -243,7 +243,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);
@@ -268,7 +268,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);
@@ -321,7 +321,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,
@@ -340,7 +340,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);
@@ -371,7 +371,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);
@@ -383,7 +383,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);
@@ -397,7 +397,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);
@@ -424,7 +424,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);
@@ -599,7 +599,7 @@ static void int_seq_stop(struct seq_file *f, void *v)
 
 
 extern int show_interrupts(struct seq_file *f, void *v); /* In arch code */
-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 4e57fcf..b9cb23c 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 2284622..6d3da93 100644
--- a/fs/proc/proc_tty.c
+++ b/fs/proc/proc_tty.c
@@ -120,7 +120,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 8043a3e..2c2755d 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -467,14 +467,14 @@ static void m_stop(struct seq_file *m, void *v)
 		put_task_struct(priv->task);
 }
 
-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,
 	.show	= show_map
 };
 
-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,
@@ -482,7 +482,7 @@ static struct seq_operations proc_pid_smaps_op = {
 };
 
 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;
@@ -526,7 +526,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 1932c2c..e5a3d8b 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -199,7 +199,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,
-- 
1.5.3.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] procfs: constify function pointer tables
  2008-01-22 20:00 ` [PATCH] procfs: constify function pointer tables Jan Engelhardt
@ 2008-01-22 21:25   ` Geert Uytterhoeven
  2008-01-22 22:43   ` Mike Frysinger
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2008-01-22 21:25 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Andrew Morton, Linux Kernel Mailing List, linux-fsdevel,
	Ivan Kokshaysky, Bryan Wu, Mikael Starvik, David Howells,
	Hirokazu Takata, Roman Zippel, Kyle McMartin, Matthew Wilcox,
	Chris Zankel

On Tue, 22 Jan 2008, Jan Engelhardt wrote:
> This touches so many different places that I did not feel like creating 
> a miniscule patch for each architecture. I hope that is ok.
> 
> ===Patch begins===
> [PATCH] procfs: constify function pointer tables
> 
> Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
> ---
>  arch/alpha/kernel/setup.c     |    2 +-
>  arch/blackfin/kernel/setup.c  |    2 +-
>  arch/cris/kernel/setup.c      |    2 +-
>  arch/frv/kernel/setup.c       |    2 +-
>  arch/h8300/kernel/setup.c     |    2 +-
>  arch/m32r/kernel/setup.c      |    2 +-
>  arch/m68k/kernel/setup.c      |    2 +-
>  arch/m68knommu/kernel/setup.c |    2 +-
>  arch/parisc/kernel/setup.c    |    2 +-
>  arch/ppc/kernel/setup.c       |    2 +-
>  arch/v850/kernel/procfs.c     |    2 +-
>  arch/xtensa/kernel/setup.c    |    2 +-
>  fs/proc/base.c                |    6 +++---
>  fs/proc/nommu.c               |    2 +-
>  fs/proc/proc_misc.c           |   22 +++++++++++-----------
>  fs/proc/proc_sysctl.c         |    4 ++--
>  fs/proc/proc_tty.c            |    2 +-
>  fs/proc/task_mmu.c            |    8 ++++----
>  fs/proc/task_nommu.c          |    2 +-
>  19 files changed, 35 insertions(+), 35 deletions(-)

m68k part is:

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] procfs: constify function pointer tables
  2008-01-22 20:00 ` [PATCH] procfs: constify function pointer tables Jan Engelhardt
  2008-01-22 21:25   ` Geert Uytterhoeven
@ 2008-01-22 22:43   ` Mike Frysinger
  2008-01-22 23:36   ` Stephen Rothwell
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Mike Frysinger @ 2008-01-22 22:43 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Andrew Morton, Linux Kernel Mailing List, linux-fsdevel,
	Ivan Kokshaysky, Bryan Wu, Mikael Starvik, David Howells,
	Hirokazu Takata, Geert Uytterhoeven, Roman Zippel, Kyle McMartin,
	Matthew Wilcox, Chris Zankel

On Jan 22, 2008 3:00 PM, Jan Engelhardt <jengelh@computergmbh.de> wrote:
> This touches so many different places that I did not feel like creating
> a miniscule patch for each architecture. I hope that is ok.

there is a linux-arch alias so you dont have to look up every
maintainer yourself ;)

>  arch/blackfin/kernel/setup.c  |    2 +-

Blackfin changes look fine, thanks

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] procfs: constify function pointer tables
       [not found] <54038cd4f87a03884e4f59f8f3697889dfb63c54.1201030614.git.jengelh@computergmbh.de>
  2008-01-22 20:00 ` [PATCH] procfs: constify function pointer tables Jan Engelhardt
@ 2008-01-22 22:57 ` David Howells
  1 sibling, 0 replies; 11+ messages in thread
From: David Howells @ 2008-01-22 22:57 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: dhowells, Andrew Morton, Linux Kernel Mailing List, linux-fsdevel,
	Ivan Kokshaysky, Bryan Wu, Mikael Starvik, Hirokazu Takata,
	Geert Uytterhoeven, Roman Zippel, Kyle McMartin, Matthew Wilcox,
	Chris Zankel


FRV looks okay.

Acked-By: David Howells <dhowells@redhat.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] procfs: constify function pointer tables
  2008-01-22 20:00 ` [PATCH] procfs: constify function pointer tables Jan Engelhardt
  2008-01-22 21:25   ` Geert Uytterhoeven
  2008-01-22 22:43   ` Mike Frysinger
@ 2008-01-22 23:36   ` Stephen Rothwell
  2008-01-23  4:18   ` Bryan Wu
  2008-01-23 16:40   ` Jesper Nilsson
  4 siblings, 0 replies; 11+ messages in thread
From: Stephen Rothwell @ 2008-01-22 23:36 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Andrew Morton, Linux Kernel Mailing List, linux-fsdevel,
	Ivan Kokshaysky, Bryan Wu, Mikael Starvik, David Howells,
	Hirokazu Takata, Geert Uytterhoeven, Roman Zippel, Kyle McMartin,
	Matthew Wilcox, Chris Zankel

[-- Attachment #1: Type: text/plain, Size: 433 bytes --]

Hi Jan,

On Tue, 22 Jan 2008 21:00:46 +0100 (CET) Jan Engelhardt <jengelh@computergmbh.de> wrote:
>
> -extern struct seq_operations mounts_op;
> +extern const struct seq_operations mounts_op;

[ and many others ... ]

I don't suppose you feel like finding appropriate header files to put
these declarations into?

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] procfs: constify function pointer tables
  2008-01-22 20:00 ` [PATCH] procfs: constify function pointer tables Jan Engelhardt
                     ` (2 preceding siblings ...)
  2008-01-22 23:36   ` Stephen Rothwell
@ 2008-01-23  4:18   ` Bryan Wu
  2008-01-23  9:06     ` Jan Engelhardt
  2008-01-23 16:40   ` Jesper Nilsson
  4 siblings, 1 reply; 11+ messages in thread
From: Bryan Wu @ 2008-01-23  4:18 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Andrew Morton, Linux Kernel Mailing List, linux-fsdevel,
	Ivan Kokshaysky, Bryan Wu, Mikael Starvik, David Howells,
	Hirokazu Takata, Geert Uytterhoeven, Roman Zippel, Kyle McMartin,
	Matthew Wilcox, Chris Zankel

On Jan 23, 2008 4:00 AM, Jan Engelhardt <jengelh@computergmbh.de> wrote:
> Hi,
>
>
> This touches so many different places that I did not feel like creating
> a miniscule patch for each architecture. I hope that is ok.
>
> ===Patch begins===
> [PATCH] procfs: constify function pointer tables
>
> Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
> ---
>  arch/alpha/kernel/setup.c     |    2 +-
>  arch/blackfin/kernel/setup.c  |    2 +-
>  arch/cris/kernel/setup.c      |    2 +-
>  arch/frv/kernel/setup.c       |    2 +-
>  arch/h8300/kernel/setup.c     |    2 +-
>  arch/m32r/kernel/setup.c      |    2 +-
>  arch/m68k/kernel/setup.c      |    2 +-
>  arch/m68knommu/kernel/setup.c |    2 +-
>  arch/parisc/kernel/setup.c    |    2 +-
>  arch/ppc/kernel/setup.c       |    2 +-
>  arch/v850/kernel/procfs.c     |    2 +-
>  arch/xtensa/kernel/setup.c    |    2 +-
>  fs/proc/base.c                |    6 +++---
>  fs/proc/nommu.c               |    2 +-
>  fs/proc/proc_misc.c           |   22 +++++++++++-----------
>  fs/proc/proc_sysctl.c         |    4 ++--
>  fs/proc/proc_tty.c            |    2 +-
>  fs/proc/task_mmu.c            |    8 ++++----
>  fs/proc/task_nommu.c          |    2 +-
>  19 files changed, 35 insertions(+), 35 deletions(-)
>
> diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
> index bd5e68c..823f18e 100644
> --- a/arch/alpha/kernel/setup.c
> +++ b/arch/alpha/kernel/setup.c
> @@ -1472,7 +1472,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 d282201..d67cf54 100644
> --- a/arch/blackfin/kernel/setup.c
> +++ b/arch/blackfin/kernel/setup.c
> @@ -691,7 +691,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,

Thanks, I understand the seq_xxx() API needs "const struct seq_operations *".
So for Blackfin part, I agree with Mike.

Acked-by: Bryan Wu <bryan.wu@analog.com>

but there are still some other files need add "const":
---
/opt/git-tree/blackfin-2.6$ grep -r seq_operations arch/*
arch/alpha/kernel/setup.c:struct seq_operations cpuinfo_op = {
arch/arm/kernel/setup.c:struct seq_operations cpuinfo_op = {
arch/arm/mach-davinci/clock.c:static struct seq_operations davinci_ck_op = {
arch/avr32/kernel/cpu.c:struct seq_operations cpuinfo_op = {
arch/avr32/mm/tlb.c:static struct seq_operations tlb_ops = {
arch/blackfin/kernel/setup.c:struct seq_operations cpuinfo_op = {
arch/cris/kernel/setup.c:struct seq_operations cpuinfo_op = {
arch/frv/kernel/setup.c:struct seq_operations cpuinfo_op = {
arch/h8300/kernel/setup.c:struct seq_operations cpuinfo_op = {
arch/ia64/hp/common/sba_iommu.c:static struct seq_operations ioc_seq_ops = {
arch/ia64/kernel/perfmon.c:struct seq_operations pfm_seq_ops = {
arch/ia64/kernel/setup.c:struct seq_operations cpuinfo_op = {
arch/ia64/sn/kernel/sn2/sn2_smp.c:static struct seq_operations
sn2_ptc_seq_ops = {
arch/ia64/sn/kernel/sn2/sn_hwperf.c:static struct seq_operations
sn_topology_seq_ops = {
arch/m32r/kernel/setup.c:struct seq_operations cpuinfo_op = {
arch/m68k/kernel/setup.c:struct seq_operations cpuinfo_op = {
arch/m68knommu/kernel/setup.c:struct seq_operations cpuinfo_op = {
arch/mips/kernel/proc.c:struct seq_operations cpuinfo_op = {
arch/parisc/kernel/setup.c:struct seq_operations cpuinfo_op = {
arch/powerpc/kernel/setup-common.c:struct seq_operations cpuinfo_op = {
----

[!snip!]

Regards,
-Bryan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] procfs: constify function pointer tables
  2008-01-23  4:18   ` Bryan Wu
@ 2008-01-23  9:06     ` Jan Engelhardt
  2008-01-23 10:41       ` Bryan Wu
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Engelhardt @ 2008-01-23  9:06 UTC (permalink / raw)
  To: Bryan Wu
  Cc: Andrew Morton, Linux Kernel Mailing List, linux-fsdevel,
	Ivan Kokshaysky, Bryan Wu, Mikael Starvik, David Howells,
	Hirokazu Takata, Geert Uytterhoeven, Roman Zippel, Kyle McMartin,
	Matthew Wilcox, Chris Zankel


On Jan 23 2008 12:18, Bryan Wu wrote:
>> [PATCH] procfs: constify function pointer tables
>> ---
>>  arch/alpha/kernel/setup.c     |    2 +-
>>  arch/blackfin/kernel/setup.c  |    2 +-
>>  [...]
>> diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
>> index bd5e68c..823f18e 100644
>> --- a/arch/alpha/kernel/setup.c
>> +++ b/arch/alpha/kernel/setup.c
>> @@ -1472,7 +1472,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,
[...]
>Thanks, I understand the seq_xxx() API needs "const struct seq_operations *".
>So for Blackfin part, I agree with Mike.
>
>but there are still some other files need add "const":
>---
>/opt/git-tree/blackfin-2.6$ grep -r seq_operations arch/*
>arch/alpha/kernel/setup.c:struct seq_operations cpuinfo_op = {

The patch already touches that :-)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] procfs: constify function pointer tables
  2008-01-23  9:06     ` Jan Engelhardt
@ 2008-01-23 10:41       ` Bryan Wu
  2008-01-23 11:25         ` Jan Engelhardt
  0 siblings, 1 reply; 11+ messages in thread
From: Bryan Wu @ 2008-01-23 10:41 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Andrew Morton, Linux Kernel Mailing List, linux-fsdevel,
	Ivan Kokshaysky, Bryan Wu, Mikael Starvik, David Howells,
	Hirokazu Takata, Geert Uytterhoeven, Roman Zippel, Kyle McMartin,
	Matthew Wilcox, Chris Zankel

On Jan 23, 2008 5:06 PM, Jan Engelhardt <jengelh@computergmbh.de> wrote:
>
> On Jan 23 2008 12:18, Bryan Wu wrote:
> >> [PATCH] procfs: constify function pointer tables
> >> ---
> >>  arch/alpha/kernel/setup.c     |    2 +-
> >>  arch/blackfin/kernel/setup.c  |    2 +-
> >>  [...]
> >> diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
> >> index bd5e68c..823f18e 100644
> >> --- a/arch/alpha/kernel/setup.c
> >> +++ b/arch/alpha/kernel/setup.c
> >> @@ -1472,7 +1472,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,
> [...]
> >Thanks, I understand the seq_xxx() API needs "const struct seq_operations *".
> >So for Blackfin part, I agree with Mike.
> >
> >but there are still some other files need add "const":
> >---
> >/opt/git-tree/blackfin-2.6$ grep -r seq_operations arch/*
> >arch/alpha/kernel/setup.c:struct seq_operations cpuinfo_op = {
>
> The patch already touches that :-)
>

Oh, this patch does not touch all, following is the missing list:
---
arch/arm/kernel/setup.c:struct seq_operations cpuinfo_op = {
arch/arm/mach-davinci/clock.c:static struct seq_operations davinci_ck_op = {
arch/avr32/kernel/cpu.c:struct seq_operations cpuinfo_op = {
arch/avr32/mm/tlb.c:static struct seq_operations tlb_ops = {
arch/ia64/hp/common/sba_iommu.c:static struct seq_operations ioc_seq_ops = {
arch/ia64/kernel/perfmon.c:struct seq_operations pfm_seq_ops = {
arch/ia64/kernel/setup.c:struct seq_operations cpuinfo_op = {
arch/ia64/sn/kernel/sn2/sn2_smp.c:static struct seq_operations
sn2_ptc_seq_ops = {
arch/ia64/sn/kernel/sn2/sn_hwperf.c:static struct seq_operations
sn_topology_seq_ops = {
arch/mips/kernel/proc.c:struct seq_operations cpuinfo_op = {
arch/powerpc/kernel/setup-common.c:struct seq_operations cpuinfo_op = {
arch/powerpc/platforms/pseries/hvCall_inst.c:static struct
seq_operations hcall_inst_seq_ops = {
arch/s390/kernel/setup.c:struct seq_operations cpuinfo_op = {
arch/sh/kernel/setup.c:struct seq_operations cpuinfo_op = {
arch/sh64/kernel/setup.c:struct seq_operations cpuinfo_op = {
arch/sparc/kernel/setup.c:struct seq_operations cpuinfo_op = {
arch/sparc64/kernel/setup.c:struct seq_operations cpuinfo_op = {
arch/x86/kernel/cpu/proc.c:struct seq_operations cpuinfo_op = {
arch/x86/kernel/setup_64.c:struct seq_operations cpuinfo_op = {
----

maybe you did not use the latest git tree.

-Bryan Wu

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] procfs: constify function pointer tables
  2008-01-23 10:41       ` Bryan Wu
@ 2008-01-23 11:25         ` Jan Engelhardt
  2008-01-23 12:16           ` Bryan Wu
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Engelhardt @ 2008-01-23 11:25 UTC (permalink / raw)
  To: Bryan Wu
  Cc: Andrew Morton, Linux Kernel Mailing List, linux-fsdevel,
	Ivan Kokshaysky, Bryan Wu, Mikael Starvik, David Howells,
	Hirokazu Takata, Geert Uytterhoeven, Roman Zippel, Kyle McMartin,
	Matthew Wilcox, Chris Zankel


On Jan 23 2008 18:41, Bryan Wu wrote:
>Oh, this patch does not touch all, following is the missing list:
>---
[...]
>arch/ia64/hp/common/sba_iommu.c:static struct seq_operations ioc_seq_ops = {
>arch/ia64/kernel/perfmon.c:struct seq_operations pfm_seq_ops = {
>arch/ia64/kernel/setup.c:struct seq_operations cpuinfo_op = {
>arch/ia64/sn/kernel/sn2/sn2_smp.c:static struct seq_operations
(and more)
[...]

They were sent as other separate patches to each maintainer.
(without lkml, would have been a needless patchbomb.)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] procfs: constify function pointer tables
  2008-01-23 11:25         ` Jan Engelhardt
@ 2008-01-23 12:16           ` Bryan Wu
  0 siblings, 0 replies; 11+ messages in thread
From: Bryan Wu @ 2008-01-23 12:16 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Andrew Morton, Linux Kernel Mailing List, linux-fsdevel,
	Ivan Kokshaysky, Bryan Wu, Mikael Starvik, David Howells,
	Hirokazu Takata, Geert Uytterhoeven, Roman Zippel, Kyle McMartin,
	Matthew Wilcox, Chris Zankel

On Jan 23, 2008 7:25 PM, Jan Engelhardt <jengelh@computergmbh.de> wrote:
>
> On Jan 23 2008 18:41, Bryan Wu wrote:
> >Oh, this patch does not touch all, following is the missing list:
> >---
> [...]
> >arch/ia64/hp/common/sba_iommu.c:static struct seq_operations ioc_seq_ops = {
> >arch/ia64/kernel/perfmon.c:struct seq_operations pfm_seq_ops = {
> >arch/ia64/kernel/setup.c:struct seq_operations cpuinfo_op = {
> >arch/ia64/sn/kernel/sn2/sn2_smp.c:static struct seq_operations
> (and more)
> [...]
>
> They were sent as other separate patches to each maintainer.
> (without lkml, would have been a needless patchbomb.)
>

Oh, don't know that. I worried a lot, -:))

-Bryan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] procfs: constify function pointer tables
  2008-01-22 20:00 ` [PATCH] procfs: constify function pointer tables Jan Engelhardt
                     ` (3 preceding siblings ...)
  2008-01-23  4:18   ` Bryan Wu
@ 2008-01-23 16:40   ` Jesper Nilsson
  4 siblings, 0 replies; 11+ messages in thread
From: Jesper Nilsson @ 2008-01-23 16:40 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Andrew Morton, Linux Kernel Mailing List, linux-fsdevel,
	Ivan Kokshaysky, Bryan Wu, Mikael Starvik, David Howells,
	Hirokazu Takata, Geert Uytterhoeven, Roman Zippel, Kyle McMartin,
	Matthew Wilcox, Chris Zankel

On Tue, Jan 22, 2008 at 09:00:46PM +0100, Jan Engelhardt wrote:
> Hi,
> 
> This touches so many different places that I did not feel like creating 
> a miniscule patch for each architecture. I hope that is ok.
> 
> ===Patch begins===
> [PATCH] procfs: constify function pointer tables
> 
> Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
> ---
...
> diff --git a/arch/cris/kernel/setup.c b/arch/cris/kernel/setup.c
> index 65466c4..e42aedd 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,

CRIS port:

Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>

/^JN - Jesper Nilsson
--
               Jesper Nilsson -- jesper.nilsson@axis.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-01-23 16:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <54038cd4f87a03884e4f59f8f3697889dfb63c54.1201030614.git.jengelh@computergmbh.de>
2008-01-22 20:00 ` [PATCH] procfs: constify function pointer tables Jan Engelhardt
2008-01-22 21:25   ` Geert Uytterhoeven
2008-01-22 22:43   ` Mike Frysinger
2008-01-22 23:36   ` Stephen Rothwell
2008-01-23  4:18   ` Bryan Wu
2008-01-23  9:06     ` Jan Engelhardt
2008-01-23 10:41       ` Bryan Wu
2008-01-23 11:25         ` Jan Engelhardt
2008-01-23 12:16           ` Bryan Wu
2008-01-23 16:40   ` Jesper Nilsson
2008-01-22 22:57 ` David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).