public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <roland@topspin.com>
To: trivial@rustcorp.com.au, torvalds@osdl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Fix compilation with CONFIG_MELAN
Date: 20 Jun 2003 15:08:29 -0700	[thread overview]
Message-ID: <52el1ol7vm.fsf@topspin.com> (raw)

This patch fixes compilation when CONFIG_MELAN is turned on.
The problem is that <asm-i386/mach-default/mach_resources.h> includes
the bogus construction

#ifdef CONFIG_MELAN
standard_io_resources[1] = { "pic1", 0x20, 0x21, IORESOURCE_BUSY };
standard_io_resources[5] = { "pic2", 0xa0, 0xa1, IORESOURCE_BUSY };
#endif

at the top level.  I tried this with Debian's gcc 2.95 and Red Hat's
gcc 3.2, and neither will accept it (they complain about a duplicate
declaration of standard_io_resources when building arch/i386/setup.c).

To duplicate this, you can do "make defconfig" and then go into "make
menuconfig" and change "Processor family" to "Elan".  Building that
config fails for me.

I assume the following is what was intended.

 - Roland

===== include/asm-i386/mach-default/mach_resources.h 1.1 vs edited =====
--- 1.1/include/asm-i386/mach-default/mach_resources.h	Thu Mar 13 17:17:51 2003
+++ edited/include/asm-i386/mach-default/mach_resources.h	Fri Jun 20 15:06:05 2003
@@ -9,18 +9,22 @@
 
 struct resource standard_io_resources[] = {
 	{ "dma1", 0x00, 0x1f, IORESOURCE_BUSY },
+#ifndef CONFIG_MELAN
 	{ "pic1", 0x20, 0x3f, IORESOURCE_BUSY },
+#else
+	{ "pic1", 0x20, 0x21, IORESOURCE_BUSY },
+#endif
 	{ "timer", 0x40, 0x5f, IORESOURCE_BUSY },
 	{ "keyboard", 0x60, 0x6f, IORESOURCE_BUSY },
 	{ "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY },
+#ifndef CONFIG_MELAN
 	{ "pic2", 0xa0, 0xbf, IORESOURCE_BUSY },
+#else
+	{ "pic2", 0xa0, 0xa1, IORESOURCE_BUSY },
+#endif
 	{ "dma2", 0xc0, 0xdf, IORESOURCE_BUSY },
 	{ "fpu", 0xf0, 0xff, IORESOURCE_BUSY }
 };
-#ifdef CONFIG_MELAN
-standard_io_resources[1] = { "pic1", 0x20, 0x21, IORESOURCE_BUSY };
-standard_io_resources[5] = { "pic2", 0xa0, 0xa1, IORESOURCE_BUSY };
-#endif
 
 #define STANDARD_IO_RESOURCES (sizeof(standard_io_resources)/sizeof(struct resource))
 

                 reply	other threads:[~2003-06-20 21:54 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=52el1ol7vm.fsf@topspin.com \
    --to=roland@topspin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=trivial@rustcorp.com.au \
    /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