From: Matthew Wilcox <willy@fc.hp.com>
To: Matthew Wilcox <willy@fc.hp.com>
Cc: Greg KH <greg@kroah.com>,
davidm@hpl.hp.com, torvalds@transmeta.com,
linux-kernel@vger.kernel.org
Subject: Re: move pci_domain_nr() inside "#ifdef CONFIG_PCI" bracket
Date: Thu, 19 Jun 2003 10:19:52 -0600 [thread overview]
Message-ID: <20030619161952.GF21906@ldl.fc.hp.com> (raw)
In-Reply-To: <20030619150344.GE21906@ldl.fc.hp.com>
On Thu, Jun 19, 2003 at 09:03:44AM -0600, Matthew Wilcox wrote:
> On Wed, Jun 18, 2003 at 02:57:06PM -0700, Greg KH wrote:
> > On Wed, Jun 18, 2003 at 02:10:04PM -0700, David Mosberger wrote:
> > > Trivial build fix: pci_domain_nr() cannot be declared unless
> > > CONFIG_PCI is defined (otherwise, struct pci_bus hasn't been defined).
> >
> > Thanks, I've added this to my pci bk tree and will send it off to Linus
> > in a bit.
>
> I don't understand. One of the PPC guys saw it too, but how is it
> possible? CONFIG_PCI is first mentioned at line 526 of pci.h.
> pci_bus is defined at line 446.
Now I understand. Tom Rini forwarded me the output from gcc -E. The
problem is that CONFIG_PCI_DOMAIN is conditional on CONFIG_PCI. So ppc
& ia64 define a macro for pci_domain_nr, then PCI_DOMAIN isn't set, so
the default definition of pci_domain_nr happens ... and gets mutilated
by the macro:
static inline int ((struct pci_controller *)( struct pci_bus *bus)->sysdata)->index { return 0; }
A bit subtle, that ... I think this patch is fine, though perhaps it'd
be best to unconditionally make CONFIG_PCI_DOMAIN true as well?
--
It's always legal to use Linux (TM) systems
http://www.gnu.org/philosophy/why-free.html
next prev parent reply other threads:[~2003-06-19 16:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-18 21:10 move pci_domain_nr() inside "#ifdef CONFIG_PCI" bracket David Mosberger
2003-06-18 21:57 ` Greg KH
2003-06-19 15:03 ` Matthew Wilcox
2003-06-19 16:19 ` Matthew Wilcox [this message]
2003-06-19 17:04 ` Ivan Kokshaysky
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=20030619161952.GF21906@ldl.fc.hp.com \
--to=willy@fc.hp.com \
--cc=davidm@hpl.hp.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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