[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1242904122.22654.162.camel@zakaz.uk.xensource.com>
Date: Thu, 21 May 2009 12:08:42 +0100
From: Ian Campbell <Ian.Campbell@...rix.com>
To: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
CC: "jeremy@...p.org" <jeremy@...p.org>,
"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
"beckyb@...nel.crashing.org" <beckyb@...nel.crashing.org>,
"okir@...e.de" <okir@...e.de>, "x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"mingo@...e.hu" <mingo@...e.hu>, "gregkh@...e.de" <gregkh@...e.de>
Subject: Re: [Xen-devel] Re: Where do we stand with the Xen patches?
On Thu, 2009-05-21 at 07:03 -0400, Ian Campbell wrote:
> On Thu, 2009-05-21 at 06:39 -0400, FUJITA Tomonori wrote:
> > On Thu, 21 May 2009 11:28:53 +0100
> > Ian Campbell <ijc@...lion.org.uk> wrote:
> >
> > > +#ifdef CONFIG_PCI_XEN
> > > +extern int xen_range_needs_mapping(phys_addr_t paddr, size_t
> size);
> > > +#else
> > > +static inline int xen_range_needs_mapping(phys_addr_t paddr,
> size_t size) { return 0; }
> > > +#endif
> >
> > I know Xen can do something like this but you think that this is
> > clean?
>
> Well, defining a static inline function when a CONFIG option is
> disabled is fairly idiomatic in the kernel and in general hiding these
> sorts of things in the headers in this way is preferred to having them
> in .c files.
Although I do concede that the function definition would probably be
better placed in a xen specific header.
Ian.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists