From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L0fi8-0001NN-Tc for qemu-devel@nongnu.org; Thu, 13 Nov 2008 12:10:29 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L0fi6-0001ML-Up for qemu-devel@nongnu.org; Thu, 13 Nov 2008 12:10:28 -0500 Received: from [199.232.76.173] (port=43265 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0fi6-0001MA-OV for qemu-devel@nongnu.org; Thu, 13 Nov 2008 12:10:26 -0500 Received: from gecko.sbs.de ([194.138.37.40]:21618) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L0fi6-0003iw-Qq for qemu-devel@nongnu.org; Thu, 13 Nov 2008 12:10:27 -0500 Message-ID: <491C5F51.20205@siemens.com> Date: Thu, 13 Nov 2008 18:09:37 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <1226594526-1855-1-git-send-email-markmc@redhat.com> In-Reply-To: <1226594526-1855-1-git-send-email-markmc@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 1/3] x86: fix warning without CONFIG_KVM Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Mark McLoughlin Mark McLoughlin wrote: > Warning is: > > target-i386/helper.c: In function `cpu_x86_cpuid': > target-i386/helper.c:1373: warning: implicit declaration of function `host_cpuid' > > Signed-off-by: Mark McLoughlin > --- > target-i386/helper.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/target-i386/helper.c b/target-i386/helper.c > index 7ddb4ce..c8b8be9 100644 > --- a/target-i386/helper.c > +++ b/target-i386/helper.c > @@ -1296,10 +1296,10 @@ target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr) > } > #endif /* !CONFIG_USER_ONLY */ > > -#if defined(CONFIG_KVM) > static void host_cpuid(uint32_t function, uint32_t *eax, uint32_t *ebx, > uint32_t *ecx, uint32_t *edx) > { > +#if defined(CONFIG_KVM) > uint32_t vec[4]; > > #ifdef __x86_64__ > @@ -1327,8 +1327,8 @@ static void host_cpuid(uint32_t function, uint32_t *eax, uint32_t *ebx, > *ecx = vec[2]; > if (edx) > *edx = vec[3]; > -} > #endif > +} Isn't it cleaner to provide an empty static inline in the !CONFIG_KVM case? Not all compilers might be smart enough to optimize this function away. Jan -- Siemens AG, Corporate Technology, CT SE 2 ES-OS Corporate Competence Center Embedded Linux