From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: [PATCH] pv-ops: Fix missing 'ifdef CONFIG_XEN' in acpi Date: Wed, 21 Apr 2010 09:31:59 -0700 Message-ID: <4BCF287F.9080802@goop.org> References: <4BC7C657.3010609@cn.fujitsu.com> <20100416145604.GC29398@phenom.dumpdata.com> <4BCA82FF.20901@cn.fujitsu.com> <4BCA8E9A.6090209@goop.org> <20100419133026.GA17501@phenom.dumpdata.com> <4BCD3C2B.3030706@cn.fujitsu.com> <20100420183301.GA32720@phenom.dumpdata.com> <4BCE7120.7020004@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4BCE7120.7020004@cn.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Yu Zhiguo Cc: "xen-devel@lists.xensource.com" , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On 04/20/2010 08:29 PM, Yu Zhiguo wrote: > We must use #if !defined(CONFIG_XEN) || (defined(CONFIG_XEN) && !defined(CONFIG_XEN_DOM0_PCI)). > CONFIG_XEN_DOM0_PCI depends on CONFIG_XEN, so there's no need to test that separately, right? "#ifndef CONFIG_XEN_DOM0_PCI" is enough. > method-4) > If we perfer to fix it in header file, another method, we can use weak attribute of gcc. > "weak" has its place, but I'm not sure its the right answer here. The main problem is that it is a link-time binding, so the generated code still has the calls out to the functions. With static inline functions, the compiler will likely completely remove all the code. J