* 2.6.15-mm3: arch/ia64/sn/kernel/sn2/sn_proc_fs.c compile error [not found] <20060111042135.24faf878.akpm@osdl.org> @ 2006-01-11 23:41 ` Adrian Bunk 2006-01-12 0:01 ` Andrew Morton 2006-01-12 1:02 ` [-mm patch] fix arch/ia64/sn/kernel/tiocx.c compilation Adrian Bunk 1 sibling, 1 reply; 7+ messages in thread From: Adrian Bunk @ 2006-01-11 23:41 UTC (permalink / raw) To: Andrew Morton, Arjan van de Ven Cc: linux-kernel, tony.luck, linux-ia64, edwardsg, linux-altix Arjan, it seems the following compile error on ia64 is caused by a patch of you that makes some stuff static: <-- snip --> ... CC arch/ia64/sn/kernel/sn2/sn_proc_fs.o arch/ia64/sn/kernel/sn2/sn_proc_fs.c: In function 'sn_procfs_create_entry': arch/ia64/sn/kernel/sn2/sn_proc_fs.c:104: warning: passing argument 1 of 'memset' discards qualifiers from pointer target type arch/ia64/sn/kernel/sn2/sn_proc_fs.c:105: error: assignment of read-only member 'open' arch/ia64/sn/kernel/sn2/sn_proc_fs.c:106: error: assignment of read-only member 'read' arch/ia64/sn/kernel/sn2/sn_proc_fs.c:107: error: assignment of read-only member 'llseek' arch/ia64/sn/kernel/sn2/sn_proc_fs.c:108: error: assignment of read-only member 'release' arch/ia64/sn/kernel/sn2/sn_proc_fs.c: In function 'register_sn_procfs': arch/ia64/sn/kernel/sn2/sn_proc_fs.c:140: error: assignment of read-only member 'write' make[3]: *** [arch/ia64/sn/kernel/sn2/sn_proc_fs.o] Error 1 <-- snip --> cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.15-mm3: arch/ia64/sn/kernel/sn2/sn_proc_fs.c compile error 2006-01-11 23:41 ` 2.6.15-mm3: arch/ia64/sn/kernel/sn2/sn_proc_fs.c compile error Adrian Bunk @ 2006-01-12 0:01 ` Andrew Morton 2006-01-12 0:17 ` Adrian Bunk 0 siblings, 1 reply; 7+ messages in thread From: Andrew Morton @ 2006-01-12 0:01 UTC (permalink / raw) To: Adrian Bunk Cc: arjan, linux-kernel, tony.luck, linux-ia64, edwardsg, linux-altix Adrian Bunk <bunk@stusta.de> wrote: > > Arjan, it seems the following compile error on ia64 is caused by a patch > of you that makes some stuff static: > > <-- snip --> > > ... > CC arch/ia64/sn/kernel/sn2/sn_proc_fs.o > arch/ia64/sn/kernel/sn2/sn_proc_fs.c: In function 'sn_procfs_create_entry': > arch/ia64/sn/kernel/sn2/sn_proc_fs.c:104: warning: passing argument 1 of 'memset' discards qualifiers from pointer target type > arch/ia64/sn/kernel/sn2/sn_proc_fs.c:105: error: assignment of read-only member 'open' > arch/ia64/sn/kernel/sn2/sn_proc_fs.c:106: error: assignment of read-only member 'read' > arch/ia64/sn/kernel/sn2/sn_proc_fs.c:107: error: assignment of read-only member 'llseek' > arch/ia64/sn/kernel/sn2/sn_proc_fs.c:108: error: assignment of read-only member 'release' > arch/ia64/sn/kernel/sn2/sn_proc_fs.c: In function 'register_sn_procfs': > arch/ia64/sn/kernel/sn2/sn_proc_fs.c:140: error: assignment of read-only member 'write' This? --- devel/arch/ia64/sn/kernel/sn2/sn_proc_fs.c~ia64-const-f_ops-fix 2006-01-11 15:58:41.000000000 -0800 +++ devel-akpm/arch/ia64/sn/kernel/sn2/sn_proc_fs.c 2006-01-11 16:00:50.000000000 -0800 @@ -98,14 +98,15 @@ static struct proc_dir_entry *sn_procfs_ struct proc_dir_entry *e = create_proc_entry(name, 0444, parent); if (e) { - e->proc_fops = (struct file_operations *)kmalloc( - sizeof(struct file_operations), GFP_KERNEL); - if (e->proc_fops) { - memset(e->proc_fops, 0, sizeof(struct file_operations)); - e->proc_fops->open = openfunc; - e->proc_fops->read = seq_read; - e->proc_fops->llseek = seq_lseek; - e->proc_fops->release = releasefunc; + struct file_operations *f; + + f = kzalloc(sizeof(*f), GFP_KERNEL); + if (f) { + f->open = openfunc; + f->read = seq_read; + f->llseek = seq_lseek; + f->release = releasefunc; + e->proc_fops = f; } } _ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.15-mm3: arch/ia64/sn/kernel/sn2/sn_proc_fs.c compile error 2006-01-12 0:01 ` Andrew Morton @ 2006-01-12 0:17 ` Adrian Bunk 2006-01-12 0:23 ` Andrew Morton 0 siblings, 1 reply; 7+ messages in thread From: Adrian Bunk @ 2006-01-12 0:17 UTC (permalink / raw) To: Andrew Morton Cc: arjan, linux-kernel, tony.luck, linux-ia64, edwardsg, linux-altix On Wed, Jan 11, 2006 at 04:01:21PM -0800, Andrew Morton wrote: > Adrian Bunk <bunk@stusta.de> wrote: > > > > Arjan, it seems the following compile error on ia64 is caused by a patch > > of you that makes some stuff static: > > > > <-- snip --> > > > > ... > > CC arch/ia64/sn/kernel/sn2/sn_proc_fs.o > > arch/ia64/sn/kernel/sn2/sn_proc_fs.c: In function 'sn_procfs_create_entry': > > arch/ia64/sn/kernel/sn2/sn_proc_fs.c:104: warning: passing argument 1 of 'memset' discards qualifiers from pointer target type > > arch/ia64/sn/kernel/sn2/sn_proc_fs.c:105: error: assignment of read-only member 'open' > > arch/ia64/sn/kernel/sn2/sn_proc_fs.c:106: error: assignment of read-only member 'read' > > arch/ia64/sn/kernel/sn2/sn_proc_fs.c:107: error: assignment of read-only member 'llseek' > > arch/ia64/sn/kernel/sn2/sn_proc_fs.c:108: error: assignment of read-only member 'release' > > arch/ia64/sn/kernel/sn2/sn_proc_fs.c: In function 'register_sn_procfs': > > arch/ia64/sn/kernel/sn2/sn_proc_fs.c:140: error: assignment of read-only member 'write' > > This? >... Nearly. The last compile error (line 140) is still present. cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.15-mm3: arch/ia64/sn/kernel/sn2/sn_proc_fs.c compile error 2006-01-12 0:17 ` Adrian Bunk @ 2006-01-12 0:23 ` Andrew Morton 2006-01-12 0:54 ` Adrian Bunk 0 siblings, 1 reply; 7+ messages in thread From: Andrew Morton @ 2006-01-12 0:23 UTC (permalink / raw) To: Adrian Bunk Cc: arjan, linux-kernel, tony.luck, linux-ia64, edwardsg, linux-altix Adrian Bunk <bunk@stusta.de> wrote: > > > > arch/ia64/sn/kernel/sn2/sn_proc_fs.c:140: error: assignment of read-only member 'write' > > > > This? > >... > > Nearly. > > The last compile error (line 140) is still present. Bah. diff -puN arch/ia64/sn/kernel/sn2/sn_proc_fs.c~ia64-const-f_ops-fix arch/ia64/sn/kernel/sn2/sn_proc_fs.c --- devel/arch/ia64/sn/kernel/sn2/sn_proc_fs.c~ia64-const-f_ops-fix 2006-01-11 16:04:18.000000000 -0800 +++ devel-akpm/arch/ia64/sn/kernel/sn2/sn_proc_fs.c 2006-01-11 16:22:38.000000000 -0800 @@ -93,19 +93,22 @@ static int coherence_id_open(struct inod static struct proc_dir_entry *sn_procfs_create_entry( const char *name, struct proc_dir_entry *parent, int (*openfunc)(struct inode *, struct file *), - int (*releasefunc)(struct inode *, struct file *)) + int (*releasefunc)(struct inode *, struct file *), + ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *)) { struct proc_dir_entry *e = create_proc_entry(name, 0444, parent); if (e) { - e->proc_fops = (struct file_operations *)kmalloc( - sizeof(struct file_operations), GFP_KERNEL); - if (e->proc_fops) { - memset(e->proc_fops, 0, sizeof(struct file_operations)); - e->proc_fops->open = openfunc; - e->proc_fops->read = seq_read; - e->proc_fops->llseek = seq_lseek; - e->proc_fops->release = releasefunc; + struct file_operations *f; + + f = kzalloc(sizeof(*f), GFP_KERNEL); + if (f) { + f->open = openfunc; + f->read = seq_read; + f->llseek = seq_lseek; + f->release = releasefunc; + f->write = write; + e->proc_fops = f; } } @@ -119,31 +122,29 @@ extern int sn_topology_release(struct in void register_sn_procfs(void) { static struct proc_dir_entry *sgi_proc_dir = NULL; - struct proc_dir_entry *e; BUG_ON(sgi_proc_dir != NULL); if (!(sgi_proc_dir = proc_mkdir("sgi_sn", NULL))) return; sn_procfs_create_entry("partition_id", sgi_proc_dir, - partition_id_open, single_release); + partition_id_open, single_release, NULL); sn_procfs_create_entry("system_serial_number", sgi_proc_dir, - system_serial_number_open, single_release); + system_serial_number_open, single_release, NULL); sn_procfs_create_entry("licenseID", sgi_proc_dir, - licenseID_open, single_release); + licenseID_open, single_release, NULL); - e = sn_procfs_create_entry("sn_force_interrupt", sgi_proc_dir, - sn_force_interrupt_open, single_release); - if (e) - e->proc_fops->write = sn_force_interrupt_write_proc; + sn_procfs_create_entry("sn_force_interrupt", sgi_proc_dir, + sn_force_interrupt_open, single_release, + sn_force_interrupt_write_proc); sn_procfs_create_entry("coherence_id", sgi_proc_dir, - coherence_id_open, single_release); + coherence_id_open, single_release, NULL); sn_procfs_create_entry("sn_topology", sgi_proc_dir, - sn_topology_open, sn_topology_release); + sn_topology_open, sn_topology_release, NULL); } #endif /* CONFIG_PROC_FS */ _ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.15-mm3: arch/ia64/sn/kernel/sn2/sn_proc_fs.c compile error 2006-01-12 0:23 ` Andrew Morton @ 2006-01-12 0:54 ` Adrian Bunk 0 siblings, 0 replies; 7+ messages in thread From: Adrian Bunk @ 2006-01-12 0:54 UTC (permalink / raw) To: Andrew Morton Cc: arjan, linux-kernel, tony.luck, linux-ia64, edwardsg, linux-altix On Wed, Jan 11, 2006 at 04:23:19PM -0800, Andrew Morton wrote: > Adrian Bunk <bunk@stusta.de> wrote: > > > > > > arch/ia64/sn/kernel/sn2/sn_proc_fs.c:140: error: assignment of read-only member 'write' > > > > > > This? > > >... > > > > Nearly. > > > > The last compile error (line 140) is still present. > > Bah. >... This patch fixed this compile error. Patch for the next compile error on ia64 follows in a minute... ;-) cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 7+ messages in thread
* [-mm patch] fix arch/ia64/sn/kernel/tiocx.c compilation [not found] <20060111042135.24faf878.akpm@osdl.org> 2006-01-11 23:41 ` 2.6.15-mm3: arch/ia64/sn/kernel/sn2/sn_proc_fs.c compile error Adrian Bunk @ 2006-01-12 1:02 ` Adrian Bunk 2006-01-12 16:43 ` Greg KH 1 sibling, 1 reply; 7+ messages in thread From: Adrian Bunk @ 2006-01-12 1:02 UTC (permalink / raw) To: Andrew Morton, Russell King, Greg K-H; +Cc: linux-kernel, tony.luck, linux-ia64 On Wed, Jan 11, 2006 at 04:21:35AM -0800, Andrew Morton wrote: >... > Changes since 2.6.15-mm2: >... > +gregkh-driver-add-tiocx-bus_type-probe-remove-methods.patch >... > driver tree updates >... This patch caused the following compile error: <-- snip --> ... CC arch/ia64/sn/kernel/tiocx.o arch/ia64/sn/kernel/tiocx.c:151: error: 'cx_device_remove' undeclared here (not in a function) make[2]: *** [arch/ia64/sn/kernel/tiocx.o] Error 1 <-- snip --> Signed-off-by: Adrian Bunk <bunk@stusta.de> --- linux-2.6.15-mm3/arch/ia64/sn/kernel/tiocx.c.old 2006-01-12 01:58:20.000000000 +0100 +++ linux-2.6.15-mm3/arch/ia64/sn/kernel/tiocx.c 2006-01-12 01:58:35.000000000 +0100 @@ -148,7 +148,7 @@ .match = tiocx_match, .uevent = tiocx_uevent, .probe = cx_device_probe, - .remove = cx_device_remove, + .remove = cx_driver_remove, }; /** ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [-mm patch] fix arch/ia64/sn/kernel/tiocx.c compilation 2006-01-12 1:02 ` [-mm patch] fix arch/ia64/sn/kernel/tiocx.c compilation Adrian Bunk @ 2006-01-12 16:43 ` Greg KH 0 siblings, 0 replies; 7+ messages in thread From: Greg KH @ 2006-01-12 16:43 UTC (permalink / raw) To: Adrian Bunk Cc: Andrew Morton, Russell King, linux-kernel, tony.luck, linux-ia64 On Thu, Jan 12, 2006 at 02:02:40AM +0100, Adrian Bunk wrote: > On Wed, Jan 11, 2006 at 04:21:35AM -0800, Andrew Morton wrote: > >... > > Changes since 2.6.15-mm2: > >... > > +gregkh-driver-add-tiocx-bus_type-probe-remove-methods.patch > >... > > driver tree updates > >... > > This patch caused the following compile error: > > <-- snip --> > > ... > CC arch/ia64/sn/kernel/tiocx.o > arch/ia64/sn/kernel/tiocx.c:151: error: 'cx_device_remove' undeclared here (not in a function) > make[2]: *** [arch/ia64/sn/kernel/tiocx.o] Error 1 > > <-- snip --> > > > Signed-off-by: Adrian Bunk <bunk@stusta.de> > > --- linux-2.6.15-mm3/arch/ia64/sn/kernel/tiocx.c.old 2006-01-12 01:58:20.000000000 +0100 > +++ linux-2.6.15-mm3/arch/ia64/sn/kernel/tiocx.c 2006-01-12 01:58:35.000000000 +0100 > @@ -148,7 +148,7 @@ > .match = tiocx_match, > .uevent = tiocx_uevent, > .probe = cx_device_probe, > - .remove = cx_device_remove, > + .remove = cx_driver_remove, > }; Thanks, I've merged it into the original patch now. greg k-h ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-01-12 16:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20060111042135.24faf878.akpm@osdl.org>
2006-01-11 23:41 ` 2.6.15-mm3: arch/ia64/sn/kernel/sn2/sn_proc_fs.c compile error Adrian Bunk
2006-01-12 0:01 ` Andrew Morton
2006-01-12 0:17 ` Adrian Bunk
2006-01-12 0:23 ` Andrew Morton
2006-01-12 0:54 ` Adrian Bunk
2006-01-12 1:02 ` [-mm patch] fix arch/ia64/sn/kernel/tiocx.c compilation Adrian Bunk
2006-01-12 16:43 ` Greg KH
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox