mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ed Tomlinson <tomlins@cam.org>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] compile error mtrr/if.c
Date: Sat, 21 Dec 2002 18:53:26 -0500	[thread overview]
Message-ID: <200212211853.26554.tomlins@cam.org> (raw)

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

                 reply	other threads:[~2002-12-21 23:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200212211853.26554.tomlins@cam.org \
    --to=tomlins@cam.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome