Skip to contentSkip to conversation

Trivial patches for October 6 to 14 2011

GIT PULL New Stefan Hajnoczi 2 participants 9 messages Oct 14, 2011 Block layer

lore
Share & tools
lore
#0 lore raw

The following changes since commit ebffe2afceb1a17b5d134b5debf553955fe5ea1a:

Merge remote-tracking branch 'qmp/queue/qmp' into staging (2011-10-10 08:21:46 -0500)

are available in the git repository at:

ssh://repo.or.cz/srv/git/qemu/stefanha.git trivial-patches

Andreas Färber (1):
arm_pic: Fix typo

Dong Xu Wang (1):
sheepdog: correct spelling

Paolo Bonzini (1):
remove hpet.h

Stefan Hajnoczi (1):
qemu-options: avoid #if in spicevmc texi help

Stefan Weil (3):
qemu-char: Fix use of free() instead of g_free()
tcg: Fix spelling in comment (varables -> variables) block/qcow: Fix use of free() instead of g_free()

 block/qcow.c     |    2 +-
 block/sheepdog.c |    2 +-
 hpet.h           |   22 ----------------------
 hw/arm_pic.c     |    2 +-
 qemu-char.c      |    8 ++++----
 qemu-options.hx  |    4 ++--
 tcg/tcg.h        |    2 +-
 7 files changed, 10 insertions(+), 32 deletions(-)
 delete mode 100644 hpet.h
Signature · 1 line
1.7.6.3
#1 lore raw

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.

---
 qemu-options.hx |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
qemu-options.hx +2 -2
index dfbabd0..d4fe990 100644
@@ -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
Signature · 1 line
1.7.6.3
#2 lore raw

PATCH 2/7 qemu-char: Fix use of free() instead of g_free()

In reply to Stefan Hajnoczi

From: Stefan Weil <[email protected]>

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

---
 qemu-char.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
qemu-char.c +4 -4
index 8bdbcfd..fb9e058 100644
@@ -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);
Signature · 1 line
1.7.6.3
#3 lore raw

PATCH 3/7 arm_pic: Fix typo

In reply to Stefan Hajnoczi

From: Andreas Färber <[email protected]>

interrput -> interrupt

---
 hw/arm_pic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/arm_pic.c +1 -1
index 985148a..41f8d3e 100644
@@ -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);
     }
 }
 
Signature · 1 line
1.7.6.3
#4 lore raw

PATCH 4/7 remove hpet.h

In reply to Stefan Hajnoczi

From: Paolo Bonzini <[email protected]>

It is unused since the HPET and RTC timers were removed (commit 25f3151, 2011-05-31).

---
 hpet.h |   22 ----------------------
 1 files changed, 0 insertions(+), 22 deletions(-)
 delete mode 100644 hpet.h
hpet.h deleted +0 -22
deleted file mode 100644
index 754051a..0000000
@@ -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__ */
Signature · 1 line
1.7.6.3
#5 lore raw

PATCH 5/7 tcg: Fix spelling in comment (varables -> variables)

In reply to Stefan Hajnoczi

From: Stefan Weil <[email protected]>

---
 tcg/tcg.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tcg/tcg.h +1 -1
index de8a1d5..015f88a 100644
@@ -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).
Signature · 1 line
1.7.6.3
#6 lore raw

PATCH 6/7 sheepdog: correct spelling

In reply to Stefan Hajnoczi

From: Dong Xu Wang <[email protected]>

---
 block/sheepdog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
block/sheepdog.c +1 -1
index c1f6e07..ae857e2 100644
@@ -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
Signature · 1 line
1.7.6.3
#7 lore raw

PATCH 7/7 block/qcow: Fix use of free() instead of g_free()

In reply to Stefan Hajnoczi

From: Stefan Weil <[email protected]>

cppcheck reported this error:

qemu/block/qcow.c:599: error: Mismatching allocation and deallocation: cluster_data

---
 block/qcow.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
block/qcow.c +1 -1
index c8bfecc..eba5a04 100644
@@ -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;
 }
Signature · 1 line
1.7.6.3
#8 lore raw
In reply to Stefan Hajnoczi
Quoted 7 lines · Stefan Hajnoczi

The following changes since commit ebffe2afceb1a17b5d134b5debf553955fe5ea1a:

   Merge remote-tracking branch 'qmp/queue/qmp' into staging (2011-10-10 08:21:46 -0500)

are available in the git repository at:

ssh://repo.or.cz/srv/git/qemu/stefanha.git trivial-patches

Pulled. Thanks.

Regards,

Anthony Liguori

Quoted 28 lines

Andreas Färber (1):
arm_pic: Fix typo

Dong Xu Wang (1):
sheepdog: correct spelling

Paolo Bonzini (1):
remove hpet.h

Stefan Hajnoczi (1):
qemu-options: avoid #if in spicevmc texi help

Stefan Weil (3):
qemu-char: Fix use of free() instead of g_free()
tcg: Fix spelling in comment (varables -> variables) block/qcow: Fix use of free() instead of g_free()

  block/qcow.c     |    2 +-
  block/sheepdog.c |    2 +-
  hpet.h           |   22 ----------------------
  hw/arm_pic.c     |    2 +-
  qemu-char.c      |    8 ++++----
  qemu-options.hx  |    4 ++--
  tcg/tcg.h        |    2 +-
  7 files changed, 10 insertions(+), 32 deletions(-)

delete mode 100644 hpet.h