From 3a846906c9c31e01efc0ce0cde39124ec9acb252 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Thu, 6 Oct 2011 11:24:12 +0100 Subject: [PATCH 1/7] qemu-options: avoid #if in spicevmc texi help Preprocessor directives cannot be used in STEXI/ETEXI sections since they are not passed through the preprocessor. The spicevmc chardev option help currently uses #if, which is included verbatim in the man page output. Fix this by simply stating that spicevmc chardevs are available only in builds with spice support. Signed-off-by: Stefan Hajnoczi --- qemu-options.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index dfbabd0088..d4fe990e27 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1673,15 +1673,15 @@ Connect to a local parallel port. @option{path} specifies the path to the parallel port device. @option{path} is required. -#if defined(CONFIG_SPICE) @item -chardev spicevmc ,id=@var{id} ,debug=@var{debug}, name=@var{name} +@option{spicevmc} is only available when spice support is built in. + @option{debug} debug level for spicevmc @option{name} name of spice channel to connect to Connect to a spice virtual machine channel, such as vdiport. -#endif @end table ETEXI From 2e02e18ba7e1b22289876166e6ed0c5f848ac20a Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Fri, 7 Oct 2011 07:38:46 +0200 Subject: [PATCH 2/7] qemu-char: Fix use of free() instead of g_free() cppcheck reported these errors: qemu-char.c:1667: error: Mismatching allocation and deallocation: s qemu-char.c:1668: error: Mismatching allocation and deallocation: chr qemu-char.c:1769: error: Mismatching allocation and deallocation: s qemu-char.c:1770: error: Mismatching allocation and deallocation: chr Tested-by: Dongxu Wang Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- qemu-char.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 8bdbcfdad2..fb9e058961 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -1664,8 +1664,8 @@ static int qemu_chr_open_win(QemuOpts *opts, CharDriverState **_chr) chr->chr_close = win_chr_close; if (win_chr_init(chr, filename) < 0) { - free(s); - free(chr); + g_free(s); + g_free(chr); return -EIO; } qemu_chr_generic_open(chr); @@ -1766,8 +1766,8 @@ static int qemu_chr_open_win_pipe(QemuOpts *opts, CharDriverState **_chr) chr->chr_close = win_chr_close; if (win_chr_pipe_init(chr, filename) < 0) { - free(s); - free(chr); + g_free(s); + g_free(chr); return -EIO; } qemu_chr_generic_open(chr); From 47601f22d1986711a0a07ea3f5d1dad26be16520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 10 Oct 2011 01:27:01 +0200 Subject: [PATCH 3/7] arm_pic: Fix typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit interrput -> interrupt Cc: Paul Brook Signed-off-by: Andreas Färber Signed-off-by: Stefan Hajnoczi --- hw/arm_pic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm_pic.c b/hw/arm_pic.c index 985148a380..41f8d3e112 100644 --- a/hw/arm_pic.c +++ b/hw/arm_pic.c @@ -39,7 +39,7 @@ static void arm_pic_cpu_handler(void *opaque, int irq, int level) cpu_reset_interrupt(env, CPU_INTERRUPT_FIQ); break; default: - hw_error("arm_pic_cpu_handler: Bad interrput line %d\n", irq); + hw_error("arm_pic_cpu_handler: Bad interrupt line %d\n", irq); } } From f4f17adc33c2ff7731f6ea3cef7c9d978c07534f Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 11 Oct 2011 09:49:43 +0200 Subject: [PATCH 4/7] remove hpet.h It is unused since the HPET and RTC timers were removed (commit 25f3151, 2011-05-31). Signed-off-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- hpet.h | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 hpet.h diff --git a/hpet.h b/hpet.h deleted file mode 100644 index 754051a443..0000000000 --- a/hpet.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __HPET__ -#define __HPET__ 1 - - - -struct hpet_info { - unsigned long hi_ireqfreq; /* Hz */ - unsigned long hi_flags; /* information */ - unsigned short hi_hpet; - unsigned short hi_timer; -}; - -#define HPET_INFO_PERIODIC 0x0001 /* timer is periodic */ - -#define HPET_IE_ON _IO('h', 0x01) /* interrupt on */ -#define HPET_IE_OFF _IO('h', 0x02) /* interrupt off */ -#define HPET_INFO _IOR('h', 0x03, struct hpet_info) -#define HPET_EPI _IO('h', 0x04) /* enable periodic */ -#define HPET_DPI _IO('h', 0x05) /* disable periodic */ -#define HPET_IRQFREQ _IOW('h', 0x6, unsigned long) /* IRQFREQ usec */ - -#endif /* !__HPET__ */ From 8ef935b22ba5cc9e0b71af36c86de54a2142744d Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 11 Oct 2011 19:43:15 +0200 Subject: [PATCH 5/7] tcg: Fix spelling in comment (varables -> variables) Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- tcg/tcg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index de8a1d5e8f..015f88ae69 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -175,7 +175,7 @@ typedef enum TCGType { typedef tcg_target_ulong TCGArg; -/* Define a type and accessor macros for varables. Using a struct is +/* Define a type and accessor macros for variables. Using a struct is nice because it gives some level of type safely. Ideally the compiler be able to see through all this. However in practice this is not true, expecially on targets with braindamaged ABIs (e.g. i386). From 7acae208ca355b4e573b1d1d257276bfdcbc0238 Mon Sep 17 00:00:00 2001 From: Dong Xu Wang Date: Fri, 14 Oct 2011 15:41:06 +0800 Subject: [PATCH 6/7] sheepdog: correct spelling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Andreas Färber Signed-off-by: Dong Xu Wang Signed-off-by: Stefan Hajnoczi --- block/sheepdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index c1f6e07ec1..ae857e294c 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -66,7 +66,7 @@ * 20 - 31 (12 bits): reserved data object space * 32 - 55 (24 bits): vdi object space * 56 - 59 ( 4 bits): reserved vdi object space - * 60 - 63 ( 4 bits): object type indentifier space + * 60 - 63 ( 4 bits): object type identifier space */ #define VDI_SPACE_SHIFT 32 From add8d262035a0c4e3ccad26b4b4a5644f4a66185 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Fri, 7 Oct 2011 07:32:47 +0200 Subject: [PATCH 7/7] block/qcow: Fix use of free() instead of g_free() cppcheck reported this error: qemu/block/qcow.c:599: error: Mismatching allocation and deallocation: cluster_data Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- block/qcow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow.c b/block/qcow.c index c8bfecc1cb..eba5a04c44 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -596,7 +596,7 @@ static int qcow_co_writev(BlockDriverState *bs, int64_t sector_num, if (qiov->niov > 1) { qemu_vfree(orig_buf); } - free(cluster_data); + g_free(cluster_data); return ret; }