* [PATCH] compile error mtrr/if.c
@ 2002-12-21 23:53 Ed Tomlinson
0 siblings, 0 replies; only message in thread
From: Ed Tomlinson @ 2002-12-21 23:53 UTC (permalink / raw)
To: linux-kernel
Hi,
I get this compiling from bk current (Dec 21):
make -f scripts/Makefile.build obj=arch/i386/kernel/cpu/mtrr
gcc -Wp,-MD,arch/i386/kernel/cpu/mtrr/.if.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=k6 -Iarch/i386/mach-generic -nostdinc -iwithprefix include -DKBUILD_BASENAME=if -DKBUILD_MODNAME=if -c -o arch/i386/kernel/cpu/mtrr/if.o arch/i386/kernel/cpu/mtrr/if.c
arch/i386/kernel/cpu/mtrr/if.c:306: duplicate initializer
arch/i386/kernel/cpu/mtrr/if.c:306: (near initialization for `mtrr_fops.release')
make[4]: *** [arch/i386/kernel/cpu/mtrr/if.o] Error 1
make[3]: *** [arch/i386/kernel/cpu/mtrr] Error 2
make[2]: *** [arch/i386/kernel/cpu] Error 2
make[1]: *** [arch/i386/kernel] Error 2
make: *** [vmlinux] Error 2
oscar% vi arch/i386/kernel/cpu/mtrr/if.c
which is caused by:
static struct file_operations mtrr_fops = {
.owner = THIS_MODULE,
.open = mtrr_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
.write = mtrr_write,
.ioctl = mtrr_ioctl,
.release = mtrr_close,
};
single_release is called in mtrr_close so I would guess that removing
".release = single_release," is the way to go (it compiles). Assuming
this is correct here is the patch.
----------
diff -Nru a/arch/i386/kernel/cpu/mtrr/if.c b/arch/i386/kernel/cpu/mtrr/if.c
--- a/arch/i386/kernel/cpu/mtrr/if.c Sat Dec 21 18:52:05 2002
+++ b/arch/i386/kernel/cpu/mtrr/if.c Sat Dec 21 18:52:05 2002
@@ -300,7 +300,6 @@
.open = mtrr_open,
.read = seq_read,
.llseek = seq_lseek,
- .release = single_release,
.write = mtrr_write,
.ioctl = mtrr_ioctl,
.release = mtrr_close,
----------
TIA,
Ed Tomlinson
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-12-21 23:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-21 23:53 [PATCH] compile error mtrr/if.c Ed Tomlinson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.