From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754800AbZEULIw (ORCPT ); Thu, 21 May 2009 07:08:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752063AbZEULIp (ORCPT ); Thu, 21 May 2009 07:08:45 -0400 Received: from smtp.citrix.com ([66.165.176.89]:26720 "EHLO SMTP.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751635AbZEULIo (ORCPT ); Thu, 21 May 2009 07:08:44 -0400 X-IronPort-AV: E=Sophos;i="4.41,227,1241409600"; d="scan'208";a="4379404" Subject: Re: [Xen-devel] Re: Where do we stand with the Xen patches? From: Ian Campbell To: FUJITA Tomonori CC: "jeremy@goop.org" , "xen-devel@lists.xensource.com" , "beckyb@kernel.crashing.org" , "okir@suse.de" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "mingo@elte.hu" , "gregkh@suse.de" In-Reply-To: <1242903785.22654.157.camel@zakaz.uk.xensource.com> References: <20090521175436L.fujita.tomonori@lab.ntt.co.jp> <1242901630.22654.135.camel@zakaz.uk.xensource.com> <1242901733.22654.138.camel@zakaz.uk.xensource.com> <20090521193910W.fujita.tomonori@lab.ntt.co.jp> <1242903785.22654.157.camel@zakaz.uk.xensource.com> Content-Type: text/plain Organization: Citrix Systems, Inc. Date: Thu, 21 May 2009 12:08:42 +0100 Message-ID: <1242904122.22654.162.camel@zakaz.uk.xensource.com> MIME-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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.