* [PATCH 0/5] trivial fixes to silence compilation warnings
@ 2008-03-27 23:27 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
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Carlo Marcelo Arenas Belon @ 2008-03-27 23:27 UTC (permalink / raw)
To: kvm-devel
The following series contains unrelated patches with fixes to compilation
warnings added since kvm-63; because of redefined macros, undefined functions
or mismatched pointer types.
PATCH 1/5 : libkvm: missing declaration for kvm_disable_pit_creation
PATCH 2/5 : qemu: cpu_model is a constant string
PATCH 3/5 : qemu: model in NICInfo is a constant string
PATCH 4/5 : qemu: PCI_COMMAND_SERR redefined
PATCH 5/5 : qemu: ARRAY_SIZE redefined
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
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH 1/5] libkvm: export kvm_disable_pit_creation to support -no-kvm-pit 2008-03-27 23:27 [PATCH 0/5] trivial fixes to silence compilation warnings Carlo Marcelo Arenas Belon @ 2008-03-27 23:30 ` 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 ` (3 subsequent siblings) 4 siblings, 0 replies; 11+ messages in thread From: Carlo Marcelo Arenas Belon @ 2008-03-27 23:30 UTC (permalink / raw) To: kvm-devel qemu/qemu-kvm.c: In function `kvm_qemu_create_context': qemu/qemu-kvm.c:549: warning: implicit declaration of function `kvm_disable_pit_creation' Signed-off-by: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe> --- libkvm/libkvm.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/libkvm/libkvm.h b/libkvm/libkvm.h index 61e7e98..29584d9 100644 --- a/libkvm/libkvm.h +++ b/libkvm/libkvm.h @@ -107,6 +107,16 @@ void kvm_finalize(kvm_context_t kvm); void kvm_disable_irqchip_creation(kvm_context_t kvm); /*! + * \brief Disable the in-kernel PIT creation + * + * In-kernel pit is enabled by default. If userspace pit is to be used, + * this should be called prior to kvm_create(). + * + * \param kvm Pointer to the kvm_context + */ +void kvm_disable_pit_creation(kvm_context_t kvm); + +/*! * \brief Create new virtual machine * * This creates a new virtual machine, maps physical RAM to it, and creates a -- 1.5.3.7 ------------------------------------------------------------------------- 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 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/5] qemu: cpu_model is a pointer to a constant string 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 ` Carlo Marcelo Arenas Belon 2008-03-27 23:38 ` [PATCH 3/5] qemu: model in NICInfo " Carlo Marcelo Arenas Belon ` (2 subsequent siblings) 4 siblings, 0 replies; 11+ messages in thread From: Carlo Marcelo Arenas Belon @ 2008-03-27 23:35 UTC (permalink / raw) To: kvm-devel qemu/hw/pc.c: In function `pc_init1': qemu/hw/pc.c:1029: warning: passing arg 1 of `qemu_system_hot_add_init' discards qualifiers from pointer target type Signed-off-by: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe> --- qemu/hw/acpi.c | 5 ++--- qemu/sysemu.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/qemu/hw/acpi.c b/qemu/hw/acpi.c index 2670642..a7e5e26 100644 --- a/qemu/hw/acpi.c +++ b/qemu/hw/acpi.c @@ -685,10 +685,9 @@ static void pciej_write(void *opaque, uint32_t addr, uint32_t val) #endif } +static const char *model; -static char *model; - -void qemu_system_hot_add_init(char *cpu_model) +void qemu_system_hot_add_init(const char *cpu_model) { register_ioport_write(GPE_BASE, 4, 1, gpe_writeb, &gpe); register_ioport_read(GPE_BASE, 4, 1, gpe_readb, &gpe); diff --git a/qemu/sysemu.h b/qemu/sysemu.h index c728605..c60072d 100644 --- a/qemu/sysemu.h +++ b/qemu/sysemu.h @@ -175,7 +175,7 @@ extern int drive_init(struct drive_opt *arg, int snapshot, void *machine); /* acpi */ void qemu_system_cpu_hot_add(int cpu, int state); -void qemu_system_hot_add_init(char *cpu_model); +void qemu_system_hot_add_init(const char *cpu_model); void qemu_system_device_hot_add(int pcibus, int slot, int state); /* device-hotplug */ -- 1.5.3.7 ------------------------------------------------------------------------- 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 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/5] qemu: model in NICInfo is a pointer to a constant string 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 ` Carlo Marcelo Arenas Belon 2008-03-27 23:40 ` [PATCH 4/5] qemu: PCI_COMMAND_SERR redefined from linux headers Carlo Marcelo Arenas Belon 2008-03-27 23:42 ` [PATCH 5/5] qemu: ARRAY_SIZE redefined Carlo Marcelo Arenas Belon 4 siblings, 0 replies; 11+ messages in thread From: Carlo Marcelo Arenas Belon @ 2008-03-27 23:38 UTC (permalink / raw) To: kvm-devel qemu/vl.c: In function `net_client_uninit': qemu/vl.c:4951: warning: passing arg 1 of `free' discards qualifiers from pointer target type Signed-off-by: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe> --- qemu/vl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu/vl.c b/qemu/vl.c index 3570388..3f6eca3 100644 --- a/qemu/vl.c +++ b/qemu/vl.c @@ -4944,7 +4944,7 @@ void net_client_uninit(NICInfo *nd) nd->vlan->nb_guest_devs--; /* XXX: free vlan on last reference */ nb_nics--; nd->used = 0; - free(nd->model); + free((void *)nd->model); } void do_info_network(void) -- 1.5.3.7 ------------------------------------------------------------------------- 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 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/5] qemu: PCI_COMMAND_SERR redefined from linux headers 2008-03-27 23:27 [PATCH 0/5] trivial fixes to silence compilation warnings Carlo Marcelo Arenas Belon ` (2 preceding siblings ...) 2008-03-27 23:38 ` [PATCH 3/5] qemu: model in NICInfo " Carlo Marcelo Arenas Belon @ 2008-03-27 23:40 ` Carlo Marcelo Arenas Belon [not found] ` <47EC981D.7040104@qumranet.com> 2008-03-27 23:42 ` [PATCH 5/5] qemu: ARRAY_SIZE redefined Carlo Marcelo Arenas Belon 4 siblings, 1 reply; 11+ messages in thread From: Carlo Marcelo Arenas Belon @ 2008-03-27 23:40 UTC (permalink / raw) To: kvm-devel qemu/hw/cirrus_vga.c:193:1: warning: "PCI_COMMAND_SERR" redefined In file included from /usr/include/linux/pci.h:21, from /var/tmp/portage/app-emulation/kvm-64/work/kvm-64/qemu/hw/pci.h:6, from /var/tmp/portage/app-emulation/kvm-64/work/kvm-64/qemu/hw/cirrus_vga.c:31: /usr/include/linux/pci_regs.h:40:1: warning: this is the location of the previous definition Signed-off-by: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe> --- qemu/hw/cirrus_vga.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu/hw/cirrus_vga.c b/qemu/hw/cirrus_vga.c index e14ec35..86ed511 100644 --- a/qemu/hw/cirrus_vga.c +++ b/qemu/hw/cirrus_vga.c @@ -190,7 +190,7 @@ #define PCI_COMMAND_PALETTESNOOPING 0x0020 #define PCI_COMMAND_PARITYDETECTION 0x0040 #define PCI_COMMAND_ADDRESSDATASTEPPING 0x0080 -#define PCI_COMMAND_SERR 0x0100 +#define PCI_COMMAND_SOFTERR 0x0100 #define PCI_COMMAND_BACKTOBACKTRANS 0x0200 // PCI 0x08, 0xff000000 (0x09-0x0b:class,0x08:rev) #define PCI_CLASS_BASE_DISPLAY 0x03 -- 1.5.3.7 ------------------------------------------------------------------------- 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 ^ permalink raw reply related [flat|nested] 11+ messages in thread
[parent not found: <47EC981D.7040104@qumranet.com>]
* [PATCH] qemu: remove conflicting dependency to <linux/pci.h> [not found] ` <47EC981D.7040104@qumranet.com> @ 2008-03-28 9:09 ` Carlo Marcelo Arenas Belon 2008-03-30 9:38 ` Avi Kivity 0 siblings, 1 reply; 11+ messages in thread From: Carlo Marcelo Arenas Belon @ 2008-03-28 9:09 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm-devel remove dependency to the pci linux headers added since c10bf6159ff24501852c91a342c3077d5388b184 and that was generating the following conflict : qemu/hw/cirrus_vga.c:193:1: warning: "PCI_COMMAND_SERR" redefined In file included from /usr/include/linux/pci.h:21, from qemu/hw/pci.h:6, from qemu/hw/cirrus_vga.c:31: /usr/include/linux/pci_regs.h:40:1: warning: this is the location of the previous definition Signed-off-by: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe> --- qemu/hw/pci.h | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/qemu/hw/pci.h b/qemu/hw/pci.h index 036e914..60e4094 100644 --- a/qemu/hw/pci.h +++ b/qemu/hw/pci.h @@ -3,10 +3,12 @@ /* PCI includes legacy ISA access. */ #include "isa.h" -#include <linux/pci.h> -/* PCI bus */ +/* imported from <linux/pci.h> */ +#define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) +#define PCI_FUNC(devfn) ((devfn) & 0x07) +/* PCI bus */ extern target_phys_addr_t pci_mem_base; typedef void PCIConfigWriteFunc(PCIDevice *pci_dev, -- 1.5.3.7 ------------------------------------------------------------------------- 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 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] qemu: remove conflicting dependency to <linux/pci.h> 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 0 siblings, 0 replies; 11+ messages in thread From: Avi Kivity @ 2008-03-30 9:38 UTC (permalink / raw) To: Carlo Marcelo Arenas Belon; +Cc: kvm-devel Carlo Marcelo Arenas Belon wrote: > remove dependency to the pci linux headers added since > c10bf6159ff24501852c91a342c3077d5388b184 and that was generating the > following conflict : > > qemu/hw/cirrus_vga.c:193:1: warning: "PCI_COMMAND_SERR" redefined > In file included from /usr/include/linux/pci.h:21, > from qemu/hw/pci.h:6, > from qemu/hw/cirrus_vga.c:31: > /usr/include/linux/pci_regs.h:40:1: warning: this is the location of the previous definition > > Applied, thanks. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 5/5] qemu: ARRAY_SIZE redefined 2008-03-27 23:27 [PATCH 0/5] trivial fixes to silence compilation warnings Carlo Marcelo Arenas Belon ` (3 preceding siblings ...) 2008-03-27 23:40 ` [PATCH 4/5] qemu: PCI_COMMAND_SERR redefined from linux headers Carlo Marcelo Arenas Belon @ 2008-03-27 23:42 ` Carlo Marcelo Arenas Belon [not found] ` <47EC9875.3020404@qumranet.com> 4 siblings, 1 reply; 11+ messages in thread From: Carlo Marcelo Arenas Belon @ 2008-03-27 23:42 UTC (permalink / raw) To: kvm-devel 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; -- 1.5.3.7 ------------------------------------------------------------------------- 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 ^ permalink raw reply related [flat|nested] 11+ messages in thread
[parent not found: <47EC9875.3020404@qumranet.com>]
* Re: [PATCH 5/5] qemu: ARRAY_SIZE redefined [not found] ` <47EC9875.3020404@qumranet.com> @ 2008-03-28 7:44 ` Carlo Marcelo Arenas Belon 2008-03-28 8:39 ` [PATCH] qemu: use ARRAY_SIZE macro as provided by osdep.h Carlo Marcelo Arenas Belon 0 siblings, 1 reply; 11+ messages in thread From: Carlo Marcelo Arenas Belon @ 2008-03-28 7:44 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm-devel 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] qemu: use ARRAY_SIZE macro as provided by osdep.h 2008-03-28 7:44 ` Carlo Marcelo Arenas Belon @ 2008-03-28 8:39 ` Carlo Marcelo Arenas Belon 2008-03-30 9:37 ` Avi Kivity 0 siblings, 1 reply; 11+ messages in thread From: Carlo Marcelo Arenas Belon @ 2008-03-28 8:39 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm-devel included through "qemu-kvm.h" -> "cpu.h" -> "cpu-defs.h" for all architectures and resulting otherwise in : qemu/qemu-kvm-x86.c:23:1: warning: "ARRAY_SIZE" redefined In file included from ../cpu-defs.h:30, from qemu/target-i386/cpu.h:45, from ../qemu-common.h:62, from qemu/hw/hw.h:5, from 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, 0 insertions(+), 2 deletions(-) diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c index 78490c5..35fb535 100644 --- a/qemu/qemu-kvm-x86.c +++ b/qemu/qemu-kvm-x86.c @@ -20,8 +20,6 @@ #define MSR_IA32_TSC 0x10 -#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) - static struct kvm_msr_list *kvm_msr_list; extern unsigned int kvm_shadow_memory; extern kvm_context_t kvm_context; -- 1.5.3.7 ------------------------------------------------------------------------- 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 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] qemu: use ARRAY_SIZE macro as provided by osdep.h 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 0 siblings, 0 replies; 11+ messages in thread From: Avi Kivity @ 2008-03-30 9:37 UTC (permalink / raw) To: Carlo Marcelo Arenas Belon; +Cc: kvm-devel Carlo Marcelo Arenas Belon wrote: > included through "qemu-kvm.h" -> "cpu.h" -> "cpu-defs.h" for all architectures > and resulting otherwise in : > > qemu/qemu-kvm-x86.c:23:1: warning: "ARRAY_SIZE" redefined In file included from ../cpu-defs.h:30, > from qemu/target-i386/cpu.h:45, > from ../qemu-common.h:62, > from qemu/hw/hw.h:5, > from qemu/qemu-kvm-x86.c:13: > ../osdep.h:30:1: warning: this is the location of the previous definition > > Applied, thanks. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-03-30 9:38 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox