From: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>
Subject: Re: [PATCH 5/5] qemu: ARRAY_SIZE redefined
Date: Fri, 28 Mar 2008 02:44:26 -0500 [thread overview]
Message-ID: <20080328074426.GA20149@tapir> (raw)
In-Reply-To: <47EC9875.3020404@qumranet.com>
On Fri, Mar 28, 2008 at 10:04:21AM +0300, Avi Kivity wrote:
> Carlo Marcelo Arenas Belon wrote:
> >qemu/qemu-kvm-x86.c:23:1: warning: "ARRAY_SIZE" redefined
> >In file included from ../cpu-defs.h:30,
> > from
> > /var/tmp/portage/app-emulation/kvm-64/work/kvm-64/qemu/target-i386/cpu.h:45,
> > from ../qemu-common.h:62,
> > from
> > /var/tmp/portage/app-emulation/kvm-64/work/kvm-64/qemu/hw/hw.h:5,
> > from
> > /var/tmp/portage/app-emulation/kvm-64/work/kvm-64/qemu/qemu-kvm-x86.c:13:
> >../osdep.h:30:1: warning: this is the location of the previous definition
> >
> >Signed-off-by: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe>
> >---
> > qemu/qemu-kvm-x86.c | 2 ++
> > 1 files changed, 2 insertions(+), 0 deletions(-)
> >
> >diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c
> >index 78490c5..ab91ff2 100644
> >--- a/qemu/qemu-kvm-x86.c
> >+++ b/qemu/qemu-kvm-x86.c
> >@@ -20,7 +20,9 @@
> >
> > #define MSR_IA32_TSC 0x10
> >
> >+#ifndef ARRAY_SIZE
> > #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
> >+#endif
> >
> > static struct kvm_msr_list *kvm_msr_list;
> > extern unsigned int kvm_shadow_memory;
>
> Why note remove the definition completely, and #include osdep.h instead?
that was my first choice as there is not even a need to include osdep.h as it
is already included and the source for this conflict.
but ARRAY_SIZE is also defined in qemu in a mips file (mips-dis.c) and
therefore assumed its current state was transitional and having it redefined
as a fallback was safer until consolidated correctly upstream.
Carlo
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
next prev parent reply other threads:[~2008-03-28 7:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-27 23:27 [PATCH 0/5] trivial fixes to silence compilation warnings Carlo Marcelo Arenas Belon
2008-03-27 23:30 ` [PATCH 1/5] libkvm: export kvm_disable_pit_creation to support -no-kvm-pit Carlo Marcelo Arenas Belon
2008-03-27 23:35 ` [PATCH 2/5] qemu: cpu_model is a pointer to a constant string Carlo Marcelo Arenas Belon
2008-03-27 23:38 ` [PATCH 3/5] qemu: model in NICInfo " Carlo Marcelo Arenas Belon
2008-03-27 23:40 ` [PATCH 4/5] qemu: PCI_COMMAND_SERR redefined from linux headers Carlo Marcelo Arenas Belon
[not found] ` <47EC981D.7040104@qumranet.com>
2008-03-28 9:09 ` [PATCH] qemu: remove conflicting dependency to <linux/pci.h> Carlo Marcelo Arenas Belon
2008-03-30 9:38 ` Avi Kivity
2008-03-27 23:42 ` [PATCH 5/5] qemu: ARRAY_SIZE redefined Carlo Marcelo Arenas Belon
[not found] ` <47EC9875.3020404@qumranet.com>
2008-03-28 7:44 ` Carlo Marcelo Arenas Belon [this message]
2008-03-28 8:39 ` [PATCH] qemu: use ARRAY_SIZE macro as provided by osdep.h Carlo Marcelo Arenas Belon
2008-03-30 9:37 ` Avi Kivity
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=20080328074426.GA20149@tapir \
--to=carenas@sajinet.com.pe \
--cc=avi@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
/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